Commit Graph

10192 Commits

Author SHA1 Message Date
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
1ec66fff16 Fixed setting data on default pool textures. 2011-10-06 20:12:15 +00:00
Lasse Öörni
5134b9a778 Do not release shader resources from the cache when reloading them, as subsystems and material passes often hold references to shader variations instead, making the shaders appear unreferenced. 2011-10-06 16:41:23 +00:00
Lasse Öörni
8448502918 Added flushing to log output. 2011-10-05 22:29:13 +00:00
Lasse Öörni
aec8534665 Fixed resource dump display.
Slightly more accurate memory use calculations for resources.
2011-10-05 20:33:43 +00:00
Lasse Öörni
41b001f995 Fixed Direct3D build. 2011-10-05 19:03:34 +00:00
Lasse Öörni
0bf24ed126 Fixed index double buffer resize.
Removed unused GetHash() function from VertexBuffer.
Removed unnecessary glBindBuffer() calls.
2011-10-05 18:04:55 +00:00
Lasse Öörni
9b1efd6a8f Use double buffering to simulate LOCK_DISCARD behavior on OpenGL to avoid GPU stall. 2011-10-05 13:51:40 +00:00
Lasse Öörni
2f74622427 Converted DebugGeometry to use a vertex buffer instead of using immediate rendering.
Removed immediate rendering.
2011-10-05 07:05:33 +00:00
Lasse Öörni
3536cbc977 Fixed setting the UI vertex buffer on OpenGL. 2011-10-05 06:33:08 +00:00
Lasse Öörni
71d2e019e6 Use a vertex buffer for UI rendering instead of several immediate mode draw operations. The vertex buffer is locked and updated once per frame, instead of several smaller locks. 2011-10-04 21:49:22 +00:00
Lasse Öörni
9add70d3be Added guard against duplicate component creation in NinjaSnowWar game objects, for possible future load/save feature. 2011-10-04 19:49:14 +00:00
Lasse Öörni
593ce78eaf Refactored temporary shadow camera creation. 2011-10-04 19:41:46 +00:00
Lasse Öörni
37621a0c4b Removed View friend class from Renderer. Made more Renderer functions public, as they can be usable also outside of View.
As they are potentially dangerous, made the execution nesting level related functions private in Script, and added ScriptFile as a friend class.
2011-10-04 19:24:07 +00:00
Lasse Öörni
7a45a5b33a Made internal event handling functions private in Object & Context.
Refactored NinjaSnowWar game object classes to use Start() function for initialization.
2011-10-04 18:48:42 +00:00
Lasse Öörni
653327dd15 Added E_NETWORKUPDATESENT event.
Added direct script access to the Controls object of Connection, instead of going through setter & getter.
Improved NinjaSnowWar controls responsiveness during low FPS, by checking for action button presses separately, and accumulating button presses for networking.
2011-10-04 16:26:19 +00:00
Lasse Öörni
4e18121be0 Updated documentation. 2011-10-04 06:50:01 +00:00
Lasse Öörni
74b995c29a Use 2 shadow map samples in fallback mode. 2011-10-04 06:48:13 +00:00
Lasse Öörni
534546f78e Fixed node ID reassigning logic. 2011-10-03 17:27:14 +00:00
Lasse Öörni
00a86d3a3f Fixed 4-sample shadow map offset on OpenGL. 2011-10-03 16:13:45 +00:00
Lasse Öörni
0c22a1076b Disallow 1-sample shadow mode when hardware PCF not supported.
Fixed OBB debug drawing.
2011-10-03 15:16:58 +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
7f09ddcb14 Simplified shader register mapping code. 2011-10-02 14:12:30 +00:00
Lasse Öörni
7d96303e39 Finalized support for overlapping Direct3D9 shader parameters, or the same shader parameters using different registers in different shaders. 2011-10-02 11:17:45 +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
2f28445d94 Removed the "directional light occluded shadowcaster" -optimization, as it may produce missing light at the far distance when shadow starts to fade. 2011-09-30 07:13:20 +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
399137b540 Force occlusion buffer to an even pixel height to prevent slightly different aspect ratio from generating worse occlusion results. 2011-09-29 19:05:25 +00:00
Lasse Öörni
a827f8c1fb Fixed potential bug in handling the first light affecting a drawable. 2011-09-29 06:54:03 +00:00
Lasse Öörni
b9dd734539 Visualize also the node of the currently hovered drawable or collision shape. 2011-09-28 22:33:06 +00:00
Lasse Öörni
f26ff1c2f6 Sort batch groups front to back according to the distance of the first batch to reduce overdraw. 2011-09-28 22:08:18 +00:00
Lasse Öörni
457aa72c37 When adding or removing ListView items, update the selection only if something was selected in the first place. 2011-09-28 20:26:50 +00:00
Lasse Öörni
baa3efacc3 Fixed the Data directory getting removed in the editor, if a scene was first loaded from there, and then from elsewhere.
Added scene node visualization to DebugRenderer.
2011-09-28 20:14:48 +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
f456812466 Fixed Light attribute names.
Fixed GLFW mouse wheel input.
2011-09-27 19:18:36 +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
7e00d6aa1d Removed PortAudio from Direct3D9 build, as it is not used.
Fixed check in setting the scissor rectangle.
2011-09-22 17:02:25 +00:00
Lasse Öörni
babd8050a1 Eliminated temporary vector allocation during instanced rendering. 2011-09-16 20:27:06 +00:00
Lasse Öörni
18edecbb70 Added release history. 2011-09-11 08:02:10 +00:00
Lasse Öörni
9160dbb0c9 Fixed shadow quality settings in the editor. 2011-09-11 07:30:08 +00:00