Commit Graph

171 Commits

Author SHA1 Message Date
Lasse Öörni
ce811badc3 Removed unnecessary shader permutations. 2011-10-26 22:20:46 +00:00
Lasse Öörni
dd9597a5ae Removed unnecessary #ifdef. 2011-10-26 21:27:11 +00:00
Lasse Öörni
0a6538f069 Further shader cleanup. 2011-10-26 21:15:12 +00:00
Lasse Öörni
d0cdfd6f1e Shader code cleanup. 2011-10-26 20:27:39 +00:00
Lasse Öörni
4f9f83eaab Made the move mode arrows smaller to match the scaling mode axes.
Corrected documentation about fallback mode shadow filtering.
2011-10-21 20:05:57 +00:00
Lasse Öörni
00dbad68cb Added different axis models for the rotation & scaling modes. 2011-10-18 19:55:05 +00:00
Lasse Öörni
b11b0f8de1 Initial gizmo-based node transform editing.
Fixed material assignments in the axes model.
Possibility to add unculled drawables to the octree.
2011-10-16 23:59:53 +00:00
Lasse Öörni
a32f0f1c26 Fixed rotation of the axes model.
Added ray-frustum intersection test.
Added accurate raycasts for point and spot lights. Directional light now never returns a raycast result, as it has an "infinite" bounding box.
Added better debug visualization of a point light.
Reorganization of the editor script code.
2011-10-16 14:53:14 +00:00
Lasse Öörni
fc0c9aff06 Added manipulator axes model. 2011-10-15 21:48:21 +00:00
Lasse Öörni
7c42215d98 Fixed possible normal map Z reconstruction overflow.
Fixed font size inconsistencies in the editor node window. Increased attribute name font size.
Merged Light's cascade split attributes into one Vector4 attribute.
Show local ID's in the editor in a more readable way.
2011-10-10 19:10:27 +00:00
Lasse Öörni
a9c5641371 Return to xGxR encoded normal maps and separate specular maps.
Instead of double buffered VBOs, avoid glMapBuffer & glUnmapBuffer in "discard" mode and use a CPU-side buffer instead.
Reduce UI & DebugRenderer vertex buffer size if grossly too large.
Updated documentation. Suggest AMD's Compressonator utility for normal map processing.
2011-10-07 21:30:02 +00:00
Lasse Öörni
74b995c29a Use 2 shadow map samples in fallback mode. 2011-10-04 06:48:13 +00:00
Lasse Öörni
1421058c9f Even more optimization of the shadow mapping shader. In 4 sample mode, pre-adjust the shadow map coordinates on the CPU. 2011-10-03 08:21:26 +00:00
Lasse Öörni
d51452b6bd Further optimization of the shadow mapping shader. 2011-10-03 06:50:36 +00:00
Lasse Öörni
2ae6aa0b2b Restored missing comment. 2011-10-02 23:11:19 +00:00
Lasse Öörni
c880535788 Optimized shadow mapping instruction count & performance on non-NVIDIA GPUs. 2011-10-02 21:51:20 +00:00
Lasse Öörni
41b67a245a Use more aggressive LOD on Jack.mesh. 2011-10-02 14:58:03 +00:00
Lasse Öörni
0e84c54306 Added shader parameter register count information in the D3D shader file format.
Added tracking of last assigned shader parameter per hardware register to D3D9Graphics. This allows reusing shader registers for different parameters in different shaders.
Removed the ElapsedTime shader parameter, as wrapping it is problematic depending on the calculations it would be used for.
Removed support for bool & int shader parameters from Graphics, as bool constants are not supported in OpenGL 2.0, and int parameters are not (at least currently) needed, and can lead to worse performance.
2011-10-01 09:28:27 +00:00
Lasse Öörni
af890623a8 Fixed batch state sorting.
Tidied up lighting shader #ifdefs.
2011-09-30 11:01:41 +00:00
Lasse Öörni
589c0ee141 Expanded the lit base pass optimization to cover also the first spot or point light affecting a drawable.
Do not render light to stencil if camera is inside the light volume.
Added optimization for directional light shadow casters that are fully occluded by another shadow caster: do not render the lit pass for them.
Removed the alpha masking hint. Alpha test no longer gives the batch a lower priority.
2011-09-29 22:53:16 +00:00
Lasse Öörni
fd06d3cf4a Fixed component ID overwrite when copy-pasting scene nodes in the editor.
Fixed light's bounding box not updating on light type, range, fov or aspect ratio change.
Fixed possible light stencil volume clipping bug when approaching a point light.
Fall back to non-specular or non-shadowed shaders if the desired light shader variation does not exist.
Unified order of light vertex & pixel shader variations.
Added support for enum accessor attributes.
Added light stencil mask toggle in the editor.
2011-09-28 19:19:28 +00:00
Lasse Öörni
cd2de4b25b Shadow map UV offsets optimization. 2011-09-28 06:49:33 +00:00
Lasse Öörni
5139e5322e Use alpha test instead of discard in shadow shaders for very slight speed gain. 2011-09-27 21:21:27 +00:00
Lasse Öörni
9ba1e748a5 Fixed unclamped specular calculations. 2011-09-27 19:31:18 +00:00
Lasse Öörni
b7c32f5887 Fixed unlit shaders possibly referring to nonexistent vertex normal, causing the D3D debug runtime to complain.
Set z = w in skybox vertex shader, instead of rewriting depth in the pixel shader.
Fixed GLSL shaders.
2011-09-27 18:29:06 +00:00
Lasse Öörni
8f921642cd Returned to Blinn-Phong equation for more pleasing specular highlights. 2011-09-27 06:59:55 +00:00
Lasse Öörni
80a6948b22 Large rendering architecture refactoring.
Optimized shaders to do more work in the vertex shader.
Deferred rendering removed, at least for now.
Switched to RGB normal maps, with specular intensity in the alpha channel. Removed NormalMapTool.
Optimization of light influence on objects by stencil masking.
Split shadowed lights are now rendered in one pass. A virtual shadow depth cube texture is used for point lights.
Refactored shadow map allocation. Allow to use lower resolution shadow maps than quarter size.
Added the Polyhedron math object, used for improved shadow map focusing.
Reversed the convention for the plane intercept parameter.
Math-related code cleanup.
2011-09-26 21:56:31 +00:00
Lasse Öörni
fe495f6bcc Added deferred fallback mode, which renders the G-buffer in 2 passes.
Made the OpenGL extensions mandatory to unify expected functionality with Direct3D9 mode.
2011-09-10 19:28:59 +00:00
Lasse Öörni
d6a3f89393 Added low-quality (1-sample) shadow filtering option.
Refactored fallback shaders so that they are compiled as variations into the SM2 directory.
2011-09-09 20:41:56 +00:00
Lasse Öörni
292ebed51f Added initial fallback mode (no MRT, no hardware shadows.) 2011-09-08 23:12:48 +00:00
Lasse Öörni
c65998f0e3 For a slight speed gain, do not draw a GBufferFill fullscreen quad when hardware depth is available, instead just clear the diffuse buffer. 2011-09-08 07:03:47 +00:00
Lasse Öörni
80aee649df Re-enabled lit base pass optimization, with more careful checks to ensure proper rendering order.
Fixed temporal AA shader GLSL syntax for ATI GPUs.
Code cleanup.
2011-09-04 14:30:42 +00:00
Lasse Öörni
8f2005f7b8 Fixed temporal antialiasing shader when INTZ depth is not used. 2011-09-02 18:44:31 +00:00
Lasse Öörni
56be63eca6 Fixed shader code. 2011-09-01 07:21:40 +00:00
Lasse Öörni
a89cb22161 Replaced edge filtering with temporal antialiasing with ghosting prevention. 2011-09-01 07:19:32 +00:00
Lasse Öörni
630edabb4b Fixed directional lights and fog in OpenGL orthographic mode. 2011-08-29 18:22:11 +00:00
Lasse Öörni
e5ad79494b Re-enabled INTZ depth support in deferred mode. 2011-08-29 07:06:41 +00:00
Lasse Öörni
da685e99de Ported optimizations and code cleanup from the prepass-branch. 2011-08-29 00:53:05 +00:00
Lasse Öörni
9859b10b35 Fixed deferred orthographic mode OpenGL shaders. 2011-08-28 14:40:16 +00:00
Lasse Öörni
f0ecda9785 Fixed numerical stability in Quaternion matrix constructor.
Fixed spotlight wrong size in deferred rendering.
Removed "first light" optimization pass due to buggy interactions with alpha blending.
Fixed morphWeights property naming on AnimatedModel.
Fixed missing shader combinations.
Ported the GraphicsTest example from Urho3D 1.0.
2011-08-24 03:52:41 +00:00
Lasse Öörni
d0ab5fb7d6 Disabled shader branching from lighting calculations as on some GPUs it has a dramatic negative performance impact.
Added -noflush command line option to disable GPU command queue flushing before rendering.
2011-08-20 14:12:16 +00:00
Lasse Öörni
424f7a957f Enabled warnings in ShaderCompiler.
Optimized physics debug geometry drawing.
Branch only in expensive pixel shaders (shadowing or specular lighting.)
Added more default colors to Color class.
2011-08-14 17:38:03 +00:00
Lasse Öörni
fa80179bdf Fixed to compile and run on Ubuntu. 2011-06-18 23:30:18 +00:00
Lasse Öörni
19a40e561b Removed unused pixel shader uniforms. 2011-06-17 07:46:32 +00:00
Lasse Öörni
3bb01cb0ed Added threshold value to the edge filter. 2011-06-15 16:24:50 +00:00
Lasse Öörni
83bf3d1464 Switched to NVIDIA FXAA II based edge filter. 2011-06-15 13:33:16 +00:00
Lasse Öörni
bea4f054c7 Tweaked the edge filter.
Fixed missing stencil buffer when using deferred antialiasing under OpenGL.
2011-06-15 06:56:19 +00:00
Lasse Öörni
87f9bbd846 Switched back to a edge filter for deferred antialiasing, as temporal antialiasing causes problems when both the camera and objects move.
Fixed infinite loop in HashMap copy.
2011-06-14 21:10:27 +00:00
Lasse Öörni
ed3751e1f8 Fixed ambient quad shader. 2011-06-13 06:43:08 +00:00
Lasse Öörni
1c5e878832 Check that render targets are supported before allowing auxiliary views. 2011-06-13 06:41:47 +00:00
Lasse Öörni
9c9643508c Use GL_DEPTH_COMPONENT24 instead of the packed depth stencil for OpenGL deferred rendering depth buffer, because the packed format seems to be slower.
Removed light prepass rendering support, as it has implementation difficulties under OpenGL and is often unsatisfactory in performance and specular lighting quality.
Removed the shader subdirectories.
Added option to specify whether single-channel images are to be interpreted as luminance or alpha, when loading into a texture.
2011-06-12 23:38:54 +00:00
Lasse Öörni
9335edc5ed Removed the need to lock vertex data in read-only mode for CPU-side processing.
Changed OpenGL immediate mode rendering to use CPU memory vertex arrays.
Fixed GLSL errors.
2011-06-12 14:57:42 +00:00
Lasse Öörni
2290441ea2 Fixed missing depth reconstruction in deferred rendering ambient quad on OpenGL. 2011-06-11 08:38:00 +00:00
Lasse Öörni
5db24c8d02 Renamed OpenGL/Direct3D9 implemntation and shader directories. 2011-06-11 07:39:58 +00:00
Lasse Öörni
c9c0610709 Added alternative OpenGL rendering path, not fully complete yet.
Fixed bugs in HashMap / HashSet.
2011-06-10 22:35:43 +00:00
Lasse Öörni
25bd3a257c Do not use equal depth test.
Fixed GetParentPath().
Removed unused vertex color shader code from deferred shaders.
2011-06-10 10:17:35 +00:00
Lasse Öörni
b7f1eecfd0 Restructured #ifdefs in shaders. 2011-06-05 16:07:50 +00:00
Lasse Öörni
1d036b34ac Fixed crash in ShaderCompiler.
Split Common.hlsl into smaller hlsl include files.
2011-06-05 11:53:39 +00:00
Lasse Öörni
118ed95315 Multithreaded the shader compilation using all available CPU cores.
Removed the const Replace() methods from String.
2011-05-22 13:47:50 +00:00
Lasse Öörni
20cfc26070 Added vertex color techniques for deferred & light prepass rendering. 2011-05-02 19:38:09 +00:00
Lasse Öörni
7c45da5588 Import new code.
Coding convention changed.
Large refactoring of the object model, scene model and script API.
Rendering improvements, including automatic instancing.
High-level network protocol and scene editor need reimplementation.
2011-05-02 06:21:40 +00:00
Lasse Öörni
a48885a729 Make way for import of new code. 2011-05-02 06:11:00 +00:00
Lasse Öörni
1009db5487 Optimized light prepass to use only the g component of light shape texture for specular strength. 2011-03-15 07:54:43 +00:00
Lasse Öörni
7b5c761d20 Fixed erroneous specular lighting outside the light cone in prepass rendering. 2011-03-15 00:02:20 +00:00
Lasse Öörni
609422cc81 Initial masked pointlight support. 2011-03-04 16:38:01 +00:00
Lasse Öörni
3ca81fd464 Added support for colored spotlight texture. 2011-03-03 22:01:40 +00:00
Lasse Öörni
ea9cc96e52 Added shadow intensity and shadow fade distance parameters for Light.
Fixed light XML load not loading all shadow parameters.
2011-02-04 13:51:46 +00:00
Lasse Öörni
347fe0815d Added more default materials.
Re-added fast square root & fast inverse square root, and fast variations of normalizing vectors & quaternions.
Skinning & instancing vertex shaders are now chosen automatically without the material having to specify them.
Refactored Button logic.
2011-01-15 20:35:13 +00:00
Lasse Öörni
e14db52ca0 More AssetImporter functionality.
Moved getD3DColor() as an inline function outside Renderer.
Fixed terminology in shaders: bitangent instead of binormal.
2011-01-10 21:23:24 +00:00
Lasse Öörni
852cdeef0e Added Signal & Thread classes. Audio is now a Thread subclass.
Removed MutexImpl class. Now the critical section is dynamically allocated instead.
Re-added LOD levels to the Jack model.
2011-01-08 14:58:30 +00:00
Lasse Öörni
902dfd4a13 Re-commit for the new year. Let's aim for less wiki update spam this time! 2011-01-02 23:33:36 +00:00