Torque3D/Engine/source/renderInstance
Azaezel 5b5c6b9907 Deferred Shading
Phase 1: buffers
engine:
provides the following hooks and methods
A) render target "color", and "matinfo". these correspond to texture[0] = "#color";  texture[2] = "#matinfo"; entries in scripts
B) utilizes the independentMrtBitDepth method added GarageGames#857 to set color to an 8RGBA if cards support it
C) adds an RenderPrePassMgr::_initShaders() method to support void RenderPrePassMgr::clearBuffers(). This operates as a pseudo-postfx by rendering a veiwspace plane which fills the screen, then calls a shader which fills both the introduced rendertarget buffers and the prepass buffer to relevant defaults (white with full alpha for prepass, black with full alpha for color and material respectively)

script:
\game\tools\worldEditor\main.cs adds additional hooks similar to GarageGames#863 for colorbuffer, specular map, and backbuffer display
\game\core\scripts\client\lighting\advanced\deferredShading.cs adds the clearbuffer shader, visualizers, and the ShaderData( AL_DeferredShader )  +  PostEffect( AL_DeferredShading ) which combine the various buffers into the output which reaches the screen under normal conditions, as well as the extended debug visualizers.
again, note the lines

   texture[0] = "#color";
   texture[1] = "#lightinfo";
   texture[2] = "#matinfo";
   target = "$backBuffer";
in particular for the core tie-in.

shader:
\game\shaders\common\lighting\advanced\deferredColorShaderP.hlsl
\game\shaders\common\lighting\advanced\gl\deferredClearGBufferP.glsl
the previously mentioned shaders which clear the buffers to specified colors

\game\shaders\common\lighting\advanced\deferredShadingP.hlsl
\game\shaders\common\lighting\advanced\gl\deferredShadingP.glsl
the tie-in shaders

the rest are visualizers

purpose: to expose methodology that allows one to render color, lighting and material information such as specular and gloss which effect the result of both when combined

long term intent: the previous prepass lighting methodology while serviceable, unfortunately had the side effect of throwing out raw color information required by more modern pipelines and methodologies. This preserves that data while also allowing the manipulation to occur only on a screenspace (or reflected speudo-screenspace) basis.
2016-02-16 01:50:58 -06:00
..
forcedMaterialMeshMgr.cpp Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
forcedMaterialMeshMgr.h Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderBinManager.cpp cleaned up variant of https://github.com/GarageGames/Torque3D/pull/768 alterations: opengl support, in-shader bug-reporting, direction vector fit to material slider-bar. 2014-12-21 14:07:42 -06:00
renderBinManager.h Remove Interior Object format (DIF) 2013-04-05 12:39:26 -04:00
renderFormatChanger.cpp Reduce innecesary changes on Render Target textures. 2014-11-08 18:34:21 +01:00
renderFormatChanger.h Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderGlowMgr.cpp Fix for rendering particles to the glow buffer 2015-05-28 20:41:42 +10:00
renderGlowMgr.h Add support for rendering particles to the glow buffer 2014-11-28 23:34:26 +01:00
renderImposterMgr.cpp added checks for valid pointers after locking 2013-06-30 17:51:38 +02:00
renderImposterMgr.h Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderMeshMgr.cpp cleaned up variant of https://github.com/GarageGames/Torque3D/pull/768 alterations: opengl support, in-shader bug-reporting, direction vector fit to material slider-bar. 2014-12-21 14:07:42 -06:00
renderMeshMgr.h Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderObjectMgr.cpp Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderObjectMgr.h Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderOcclusionMgr.cpp Remove dead code that contains a delete of an uninitialized pointer 2015-02-20 18:42:30 -05:00
renderOcclusionMgr.h Remove dead code that contains a delete of an uninitialized pointer 2015-02-20 18:42:30 -05:00
renderParticleMgr.cpp Merge pull request #921 from lukaspj/Mixed-Particle-Rendering-Warning-Fix 2014-12-21 19:06:57 +11:00
renderParticleMgr.h Fix for rendering particles to the glow buffer 2015-05-28 20:41:42 +10:00
renderPassManager.cpp Re-submission of the Volumetric Fog PR, with cleanup. 2015-12-01 00:10:13 -06:00
renderPassManager.h Re-submission of the Volumetric Fog PR, with cleanup. 2015-12-01 00:10:13 -06:00
renderPassStateToken.cpp Initial Implementation of the Taml, Asset and Modules systems. 2015-10-13 15:19:36 -05:00
renderPassStateToken.h Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderPrePassMgr.cpp Deferred Shading 2016-02-16 01:50:58 -06:00
renderPrePassMgr.h Deferred Shading 2016-02-16 01:50:58 -06:00
renderTerrainMgr.cpp Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderTerrainMgr.h Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderTexTargetBinManager.cpp Glow buffer graphic corruption fix on OpenGL. 2016-01-14 23:51:35 +01:00
renderTexTargetBinManager.h Engine directory for ticket #1 2012-09-19 11:15:01 -04:00
renderTranslucentMgr.cpp Re-submission of the Volumetric Fog PR, with cleanup. 2015-12-01 00:10:13 -06:00
renderTranslucentMgr.h Engine directory for ticket #1 2012-09-19 11:15:01 -04:00