Torque3D/Engine/source
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
..
app Initial Implementation of the Taml, Asset and Modules systems. 2015-10-13 15:19:36 -05:00
assets Initial Implementation of the Taml, Asset and Modules systems. 2015-10-13 15:19:36 -05:00
cinterface Remove value constructors for ConsoleValueRef & fix callbacks which use them. Fixes issue #1289 2015-05-08 09:04:04 +10:00
collision Issue found with PVS-Studio: 2015-07-16 22:02:18 -05:00
component Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro. 2014-11-03 22:42:51 -05:00
console Fix TinyXML Build errors 2015-11-22 02:45:25 -05:00
core Merge pull request #1395 from Azaezel/AssertDivNULL 2016-01-16 17:53:00 -06:00
environment Missed a few files. 2015-12-01 00:49:37 -06:00
forest shadow caching 2015-10-13 18:12:19 -05:00
gfx Update gfxGLTextureTarget.cpp 2016-01-18 06:17:20 +01:00
gui Merge pull request #1478 from Areloch/VolFog2 2016-01-15 11:22:25 -06:00
i18n Issue found with PVS-Studio: 2015-07-21 23:22:21 -05:00
lighting Merge pull request #1461 from Azaezel/textureLinearization 2016-02-16 01:23:16 -06:00
main Pass by const reference 2015-02-20 18:42:32 -05:00
materials Merge pull request #1461 from Azaezel/textureLinearization 2016-02-16 01:23:16 -06:00
math Merge pull request #1419 from irei1as/patch-1 2016-02-16 00:22:39 +01:00
module Initial Implementation of the Taml, Asset and Modules systems. 2015-10-13 15:19:36 -05:00
navigation mDirtyTiles changed from std::queue to a vector 2015-11-27 16:17:30 -06:00
persistence Some cleanup and adding in the necessary changes to cmake. 2015-10-13 15:50:30 -05:00
platform Initial Implementation of the Taml, Asset and Modules systems. 2015-10-13 15:19:36 -05:00
platformMac Merge pull request #1173 from JeffProgrammer/gestalt_fix_gg 2015-07-23 16:20:36 +10:00
platformPOSIX Fixes for dedicated build on linux. 2014-05-30 12:35:39 +02:00
platformSDL release the mouse from window constraints when poping up a window prompt 2015-08-10 21:54:30 -05:00
platformWin32 Fix for the directory scan for modules so it doesn't trim off characters in the path. 2016-01-08 00:19:11 -06:00
platformX86UNIX Fix missing va_end's 2015-02-20 18:42:29 -05:00
postFx Issue found by PVS Studio: 2015-07-28 23:25:09 -05:00
renderInstance Deferred Shading 2016-02-16 01:50:58 -06:00
scene shadow caching 2015-10-13 18:12:19 -05:00
sfx Merge pull request #1424 from rextimmy/fmod_crash_fix 2016-02-16 00:26:47 +01:00
shaderGen diffuse/albedo texture linearization 2015-11-11 13:52:46 -06:00
sim Initial Implementation of the Taml, Asset and Modules systems. 2015-10-13 15:19:36 -05:00
T3D Merge of PR #855 2016-02-16 00:23:02 -06:00
terrain diffuse/albedo texture linearization 2015-11-11 13:52:46 -06:00
testing All unit tests that run now pass. 2014-09-29 11:38:44 +10:00
ts setDetailFromDistance aspect ratio friendly adjustment 2016-01-28 00:42:08 -06:00
util diffuse/albedo texture linearization 2015-11-11 13:52:46 -06:00
windowManager Re-submission of the Volumetric Fog PR, with cleanup. 2015-12-01 00:10:13 -06:00
ggEndOfLineFix.txt Engine directory for ticket #1 2012-09-19 11:15:01 -04:00