2
0
Эх сурвалжийг харах

Merge pull request #2003 from Areloch/FullPrepassDeferredRename

Prepass->Deferred rename for full template
Areloch 8 жил өмнө
parent
commit
c460868814
64 өөрчлөгдсөн 234 нэмэгдсэн , 234 устгасан
  1. 3 3
      Templates/Full/game/core/scripts/client/lighting/advanced/deferredShading.cs
  2. 7 7
      Templates/Full/game/core/scripts/client/lighting/advanced/lightViz.cs
  3. 12 12
      Templates/Full/game/core/scripts/client/lighting/advanced/shaders.cs
  4. 2 2
      Templates/Full/game/core/scripts/client/postFx/MLAA.cs
  5. 2 2
      Templates/Full/game/core/scripts/client/postFx/MotionBlurFx.cs
  6. 2 2
      Templates/Full/game/core/scripts/client/postFx/caustics.cs
  7. 2 2
      Templates/Full/game/core/scripts/client/postFx/dof.cs
  8. 2 2
      Templates/Full/game/core/scripts/client/postFx/edgeAA.cs
  9. 4 4
      Templates/Full/game/core/scripts/client/postFx/fog.cs
  10. 1 1
      Templates/Full/game/core/scripts/client/postFx/hdr.cs
  11. 2 2
      Templates/Full/game/core/scripts/client/postFx/lightRay.cs
  12. 7 7
      Templates/Full/game/core/scripts/client/postFx/ssao.cs
  13. 3 3
      Templates/Full/game/core/scripts/client/shaders.cs
  14. 6 6
      Templates/Full/game/core/scripts/client/water.cs
  15. 2 2
      Templates/Full/game/shaders/common/VolumetricFog/VFogP.hlsl
  16. 1 1
      Templates/Full/game/shaders/common/VolumetricFog/VFogPreP.hlsl
  17. 1 1
      Templates/Full/game/shaders/common/VolumetricFog/VFogPreV.hlsl
  18. 2 2
      Templates/Full/game/shaders/common/VolumetricFog/gl/VFogP.glsl
  19. 4 4
      Templates/Full/game/shaders/common/gl/particlesP.glsl
  20. 2 2
      Templates/Full/game/shaders/common/lighting/advanced/dbgDepthVisualizeP.hlsl
  21. 2 2
      Templates/Full/game/shaders/common/lighting/advanced/dbgLightColorVisualizeP.hlsl
  22. 2 2
      Templates/Full/game/shaders/common/lighting/advanced/dbgLightSpecularVisualizeP.hlsl
  23. 2 2
      Templates/Full/game/shaders/common/lighting/advanced/dbgNormalVisualizeP.hlsl
  24. 1 1
      Templates/Full/game/shaders/common/lighting/advanced/deferredClearGBufferP.hlsl
  25. 4 4
      Templates/Full/game/shaders/common/lighting/advanced/deferredShadingP.hlsl
  26. 2 2
      Templates/Full/game/shaders/common/lighting/advanced/gl/dbgDepthVisualizeP.glsl
  27. 2 2
      Templates/Full/game/shaders/common/lighting/advanced/gl/dbgLightColorVisualizeP.glsl
  28. 2 2
      Templates/Full/game/shaders/common/lighting/advanced/gl/dbgLightSpecularVisualizeP.glsl
  29. 2 2
      Templates/Full/game/shaders/common/lighting/advanced/gl/dbgNormalVisualizeP.glsl
  30. 1 1
      Templates/Full/game/shaders/common/lighting/advanced/gl/deferredClearGBufferP.glsl
  31. 4 4
      Templates/Full/game/shaders/common/lighting/advanced/gl/deferredShadingP.glsl
  32. 4 4
      Templates/Full/game/shaders/common/lighting/advanced/gl/pointLightP.glsl
  33. 4 4
      Templates/Full/game/shaders/common/lighting/advanced/gl/spotLightP.glsl
  34. 4 4
      Templates/Full/game/shaders/common/lighting/advanced/gl/vectorLightP.glsl
  35. 4 4
      Templates/Full/game/shaders/common/lighting/advanced/particlePointLightP.hlsl
  36. 4 4
      Templates/Full/game/shaders/common/lighting/advanced/pointLightP.hlsl
  37. 4 4
      Templates/Full/game/shaders/common/lighting/advanced/spotLightP.hlsl
  38. 4 4
      Templates/Full/game/shaders/common/lighting/advanced/vectorLightP.hlsl
  39. 4 4
      Templates/Full/game/shaders/common/particlesP.hlsl
  40. 4 4
      Templates/Full/game/shaders/common/postFx/caustics/causticsP.hlsl
  41. 4 4
      Templates/Full/game/shaders/common/postFx/caustics/gl/causticsP.glsl
  42. 4 4
      Templates/Full/game/shaders/common/postFx/dof/gl/DOF_DownSample_P.glsl
  43. 1 1
      Templates/Full/game/shaders/common/postFx/dof/gl/DOF_Final_P.glsl
  44. 2 2
      Templates/Full/game/shaders/common/postFx/edgeaa/edgeDetectP.hlsl
  45. 4 4
      Templates/Full/game/shaders/common/postFx/edgeaa/gl/edgeDetectP.glsl
  46. 3 3
      Templates/Full/game/shaders/common/postFx/fogP.hlsl
  47. 3 3
      Templates/Full/game/shaders/common/postFx/gl/fogP.glsl
  48. 4 4
      Templates/Full/game/shaders/common/postFx/gl/motionBlurP.glsl
  49. 3 3
      Templates/Full/game/shaders/common/postFx/gl/underwaterFogP.glsl
  50. 2 2
      Templates/Full/game/shaders/common/postFx/lightRay/gl/lightRayOccludeP.glsl
  51. 2 2
      Templates/Full/game/shaders/common/postFx/lightRay/lightRayOccludeP.hlsl
  52. 7 7
      Templates/Full/game/shaders/common/postFx/mlaa/edgeDetectionP.hlsl
  53. 7 7
      Templates/Full/game/shaders/common/postFx/mlaa/gl/edgeDetectionP.glsl
  54. 4 4
      Templates/Full/game/shaders/common/postFx/motionBlurP.hlsl
  55. 3 3
      Templates/Full/game/shaders/common/postFx/ssao/SSAO_Blur_P.hlsl
  56. 6 6
      Templates/Full/game/shaders/common/postFx/ssao/SSAO_P.hlsl
  57. 3 3
      Templates/Full/game/shaders/common/postFx/ssao/gl/SSAO_Blur_P.glsl
  58. 6 6
      Templates/Full/game/shaders/common/postFx/ssao/gl/SSAO_P.glsl
  59. 3 3
      Templates/Full/game/shaders/common/postFx/underwaterFogP.hlsl
  60. 2 2
      Templates/Full/game/shaders/common/shaderModelAutoGen.hlsl
  61. 1 1
      Templates/Full/game/shaders/common/water/gl/waterBasicP.glsl
  62. 16 16
      Templates/Full/game/shaders/common/water/gl/waterP.glsl
  63. 1 1
      Templates/Full/game/shaders/common/water/waterBasicP.hlsl
  64. 16 16
      Templates/Full/game/shaders/common/water/waterP.hlsl

+ 3 - 3
Templates/Full/game/core/scripts/client/lighting/advanced/deferredShading.cs

@@ -46,9 +46,9 @@ new ShaderData( AL_DeferredShader )
    OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/deferredShadingP.glsl";
 
    samplerNames[0] = "colorBufferTex";
-   samplerNames[1] = "lightPrePassTex";
+   samplerNames[1] = "lightDeferredTex";
    samplerNames[2] = "matInfoTex";
-   samplerNames[3] = "prepassTex";
+   samplerNames[3] = "deferredTex";
    
    pixVersion = 2.0;
 };
@@ -62,7 +62,7 @@ singleton PostEffect( AL_DeferredShading )
    texture[0] = "#color";
    texture[1] = "#lightinfo";
    texture[2] = "#matinfo";
-   texture[3] = "#prepass";
+   texture[3] = "#deferred";
    
    target = "$backBuffer";
    renderPriority = 10000;

+ 7 - 7
Templates/Full/game/core/scripts/client/lighting/advanced/lightViz.cs

@@ -44,7 +44,7 @@ new GFXStateBlockData( AL_DefaultVisualizeState )
    zWriteEnable = false;
 
    samplersDefined = true;
-   samplerStates[0] = SamplerClampPoint;   // #prepass
+   samplerStates[0] = SamplerClampPoint;   // #deferred
    samplerStates[1] = SamplerClampLinear;  // depthviz
 };
 
@@ -56,7 +56,7 @@ new ShaderData( AL_DepthVisualizeShader )
    OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl";
    OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/dbgDepthVisualizeP.glsl";
 
-   samplerNames[0] = "prepassTex";
+   samplerNames[0] = "deferredTex";
    samplerNames[1] = "depthViz";
 
    pixVersion = 2.0;
@@ -66,7 +66,7 @@ singleton PostEffect( AL_DepthVisualize )
 {   
    shader = AL_DepthVisualizeShader;
    stateBlock = AL_DefaultVisualizeState;
-   texture[0] = "#prepass";
+   texture[0] = "#deferred";
    texture[1] = "depthviz";   
    target = "$backBuffer";
    renderPriority = 9999;
@@ -113,7 +113,7 @@ new ShaderData( AL_NormalsVisualizeShader )
    OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl";
    OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/dbgNormalVisualizeP.glsl";
    
-   samplerNames[0] = "prepassTex";
+   samplerNames[0] = "deferredTex";
    
    pixVersion = 2.0;
 };
@@ -122,7 +122,7 @@ singleton PostEffect( AL_NormalsVisualize )
 {   
    shader = AL_NormalsVisualizeShader;
    stateBlock = AL_DefaultVisualizeState;
-   texture[0] = "#prepass";
+   texture[0] = "#deferred";
    target = "$backBuffer";
    renderPriority = 9999;
 };
@@ -149,7 +149,7 @@ new ShaderData( AL_LightColorVisualizeShader )
    OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl";
    OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/dbgLightColorVisualizeP.glsl";
    
-   samplerNames[0] = "lightPrePassTex";
+   samplerNames[0] = "lightDeferredTex";
    
    pixVersion = 2.0;
 };
@@ -184,7 +184,7 @@ new ShaderData( AL_LightSpecularVisualizeShader )
    OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl";
    OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/dbgLightSpecularVisualizeP.glsl";
    
-   samplerNames[0] = "lightPrePassTex";
+   samplerNames[0] = "lightDeferredTex";
    
    pixVersion = 2.0;
 };

+ 12 - 12
Templates/Full/game/core/scripts/client/lighting/advanced/shaders.cs

@@ -36,7 +36,7 @@ new GFXStateBlockData( AL_VectorLightState )
 
    samplersDefined = true;
    samplerStates[0] = SamplerClampPoint;  // G-buffer
-   mSamplerNames[0] = "prePassBuffer";
+   mSamplerNames[0] = "deferredBuffer";
    samplerStates[1] = SamplerClampPoint;  // Shadow Map (Do not change this to linear, as all cards can not filter equally.)
    mSamplerNames[1] = "shadowMap";
    samplerStates[2] = SamplerClampPoint;  // Shadow Map (Do not change this to linear, as all cards can not filter equally.)
@@ -66,7 +66,7 @@ new ShaderData( AL_VectorLightShader )
    OGLVertexShaderFile = "shaders/common/lighting/advanced/gl/farFrustumQuadV.glsl";
    OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/vectorLightP.glsl";
    
-   samplerNames[0] = "$prePassBuffer";
+   samplerNames[0] = "$deferredBuffer";
    samplerNames[1] = "$shadowMap";
    samplerNames[2] = "$dynamicShadowMap";
    samplerNames[3] = "$ssaoMask";
@@ -82,7 +82,7 @@ new CustomMaterial( AL_VectorLightMaterial )
    shader = AL_VectorLightShader;
    stateBlock = AL_VectorLightState;
    
-   sampler["prePassBuffer"] = "#prepass";
+   sampler["deferredBuffer"] = "#deferred";
    sampler["shadowMap"] = "$dynamiclight";
    sampler["dynamicShadowMap"] = "$dynamicShadowMap";
    sampler["ssaoMask"] = "#ssaoMask";  
@@ -113,7 +113,7 @@ new GFXStateBlockData( AL_ConvexLightState )
 
    samplersDefined = true;
    samplerStates[0] = SamplerClampPoint;  // G-buffer
-   mSamplerNames[0] = "prePassBuffer";
+   mSamplerNames[0] = "deferredBuffer";
    samplerStates[1] = SamplerClampPoint;  // Shadow Map (Do not use linear, these are perspective projections)
    mSamplerNames[1] = "shadowMap";
    samplerStates[2] = SamplerClampPoint;  // Shadow Map (Do not use linear, these are perspective projections)
@@ -142,7 +142,7 @@ new ShaderData( AL_PointLightShader )
    OGLVertexShaderFile = "shaders/common/lighting/advanced/gl/convexGeometryV.glsl";
    OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/pointLightP.glsl";
 
-   samplerNames[0] = "$prePassBuffer";
+   samplerNames[0] = "$deferredBuffer";
    samplerNames[1] = "$shadowMap";
    samplerNames[2] = "$dynamicShadowMap";
    samplerNames[3] = "$cookieMap";
@@ -159,7 +159,7 @@ new CustomMaterial( AL_PointLightMaterial )
    shader = AL_PointLightShader;
    stateBlock = AL_ConvexLightState;
    
-   sampler["prePassBuffer"] = "#prepass";
+   sampler["deferredBuffer"] = "#deferred";
    sampler["shadowMap"] = "$dynamiclight";
    sampler["dynamicShadowMap"] = "$dynamicShadowMap";
    sampler["cookieMap"] = "$dynamiclightmask";
@@ -181,7 +181,7 @@ new ShaderData( AL_SpotLightShader )
    OGLVertexShaderFile = "shaders/common/lighting/advanced/gl/convexGeometryV.glsl";
    OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/spotLightP.glsl";
    
-   samplerNames[0] = "$prePassBuffer";
+   samplerNames[0] = "$deferredBuffer";
    samplerNames[1] = "$shadowMap";
    samplerNames[2] = "$dynamicShadowMap";
    samplerNames[3] = "$cookieMap";
@@ -198,7 +198,7 @@ new CustomMaterial( AL_SpotLightMaterial )
    shader = AL_SpotLightShader;
    stateBlock = AL_ConvexLightState;
    
-   sampler["prePassBuffer"] = "#prepass";
+   sampler["deferredBuffer"] = "#deferred";
    sampler["shadowMap"] = "$dynamiclight";
    sampler["dynamicShadowMap"] = "$dynamicShadowMap";
    sampler["cookieMap"] = "$dynamiclightmask";
@@ -211,9 +211,9 @@ new CustomMaterial( AL_SpotLightMaterial )
    pixVersion = 3.0;
 };
 
-/// This material is used for generating prepass 
+/// This material is used for generating deferred 
 /// materials for objects that do not have materials.
-new Material( AL_DefaultPrePassMaterial )
+new Material( AL_DefaultDeferredMaterial )
 {
    // We need something in the first pass else it 
    // won't create a proper material instance.  
@@ -258,7 +258,7 @@ new ShaderData( AL_ParticlePointLightShader )
    OGLVertexShaderFile = "shaders/common/lighting/advanced/gl/convexGeometryV.glsl";
    OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/pointLightP.glsl";
    
-   samplerNames[0] = "$prePassBuffer";   
+   samplerNames[0] = "$deferredBuffer";   
       
    pixVersion = 3.0;
 };
@@ -268,7 +268,7 @@ new CustomMaterial( AL_ParticlePointLightMaterial )
    shader = AL_ParticlePointLightShader;
    stateBlock = AL_ConvexLightState;
    
-   sampler["prePassBuffer"] = "#prepass";
+   sampler["deferredBuffer"] = "#deferred";
    target = "lightinfo";
    
    pixVersion = 3.0;

+ 2 - 2
Templates/Full/game/core/scripts/client/postFx/MLAA.cs

@@ -51,7 +51,7 @@ singleton ShaderData( MLAA_EdgeDetectionShader )
    OGLPixelShaderFile   = "shaders/common/postFx/mlaa/gl/edgeDetectionP.glsl";
 
    samplerNames[0] = "$colorMapG";
-   samplerNames[1] = "$prepassMap";
+   samplerNames[1] = "$deferredMap";
 
    pixVersion = 3.0;
 };
@@ -125,7 +125,7 @@ singleton PostEffect( MLAAFx )
    renderTime = "PFXAfterDiffuse";
 
    texture[0] = "$backBuffer"; //colorMapG      
-   texture[1] = "#prepass"; // Used for depth detection
+   texture[1] = "#deferred"; // Used for depth detection
 
    target = "$outTex";
    targetClear = PFXTargetClear_OnDraw;

+ 2 - 2
Templates/Full/game/core/scripts/client/postFx/MotionBlurFx.cs

@@ -29,7 +29,7 @@ singleton ShaderData( PFX_MotionBlurShader )
    OGLPixelShaderFile    = "shaders/common/postFx/gl/motionBlurP.glsl";
    
    samplerNames[0] = "$backBuffer";
-   samplerNames[1] = "$prepassTex";
+   samplerNames[1] = "$deferredTex";
    
    pixVersion = 3.0;  
 };  
@@ -43,7 +43,7 @@ singleton PostEffect(MotionBlurFX)
    shader = PFX_MotionBlurShader;  
    stateBlock = PFX_DefaultStateBlock;  
    texture[0] = "$backbuffer";
-   texture[1] = "#prepass";
+   texture[1] = "#deferred";
    target = "$backBuffer";
 };
 

+ 2 - 2
Templates/Full/game/core/scripts/client/postFx/caustics.cs

@@ -41,7 +41,7 @@ singleton ShaderData( PFX_CausticsShader )
    OGLVertexShaderFile  = "shaders/common/postFx/gl/postFxV.glsl";
    OGLPixelShaderFile   = "shaders/common/postFx/caustics/gl/causticsP.glsl";
       
-   samplerNames[0] = "$prepassTex";
+   samplerNames[0] = "$deferredTex";
    samplerNames[1] = "$causticsTex0";
    samplerNames[2] = "$causticsTex1";
    
@@ -57,7 +57,7 @@ singleton PostEffect( CausticsPFX )
       
    shader = PFX_CausticsShader;
    stateBlock = PFX_CausticsStateBlock;
-   texture[0] = "#prepass";
+   texture[0] = "#deferred";
    texture[1] = "./textures/caustics_1";
    texture[2] = "./textures/caustics_2";
    target = "$backBuffer";

+ 2 - 2
Templates/Full/game/core/scripts/client/postFx/dof.cs

@@ -430,7 +430,7 @@ singleton PostEffect( DOFPostEffect )
    shader = PFX_DOFDownSampleShader;
    stateBlock = PFX_DOFDownSampleStateBlock;
    texture[0] = "$backBuffer";
-   texture[1] = "#prepass";
+   texture[1] = "#deferred";
    target = "#shrunk";
    targetScale = "0.25 0.25";   
    
@@ -485,7 +485,7 @@ singleton PostEffect( DOFFinalPFX )
    texture[0] = "$backBuffer";
    texture[1] = "$inTex";
    texture[2] = "#largeBlur";   
-   texture[3] = "#prepass";   
+   texture[3] = "#deferred";   
    target = "$backBuffer";
 };
 

+ 2 - 2
Templates/Full/game/core/scripts/client/postFx/edgeAA.cs

@@ -40,7 +40,7 @@ singleton ShaderData( PFX_EdgeAADetectShader )
    OGLVertexShaderFile  = "shaders/common/postFx/gl/postFxV.glsl";
    OGLPixelShaderFile   = "shaders/common/postFx/edgeaa/gl/edgeDetectP.glsl";
       
-   samplerNames[0] = "$prepassBuffer";
+   samplerNames[0] = "$deferredBuffer";
    
    pixVersion = 3.0;
 };
@@ -81,7 +81,7 @@ singleton PostEffect( EdgeDetectPostEffect )
       
    shader = PFX_EdgeAADetectShader;
    stateBlock = PFX_DefaultEdgeAAStateBlock;
-   texture[0] = "#prepass";
+   texture[0] = "#deferred";
    target = "#edge";
    
    isEnabled = true;

+ 4 - 4
Templates/Full/game/core/scripts/client/postFx/fog.cs

@@ -32,7 +32,7 @@ singleton ShaderData( FogPassShader )
    OGLVertexShaderFile  = "shaders/common/postFx/gl/postFxV.glsl";
    OGLPixelShaderFile   = "shaders/common/postFx/gl/fogP.glsl";
             
-   samplerNames[0] = "$prepassTex";
+   samplerNames[0] = "$deferredTex";
    
    pixVersion = 2.0;
 };
@@ -58,7 +58,7 @@ singleton PostEffect( FogPostFx )
    
    shader = FogPassShader;
    stateBlock = FogPassStateBlock;
-   texture[0] = "#prepass";
+   texture[0] = "#deferred";
    
    renderPriority = 5;
    
@@ -79,7 +79,7 @@ singleton ShaderData( UnderwaterFogPassShader )
    OGLVertexShaderFile  = "shaders/common/postFx/gl/postFxV.glsl";
    OGLPixelShaderFile   = "shaders/common/postFx/gl/underwaterFogP.glsl";
             
-   samplerNames[0] = "$prepassTex";
+   samplerNames[0] = "$deferredTex";
    samplerNames[1] = "$backbuffer";
    samplerNames[2] = "$waterDepthGradMap";
    
@@ -110,7 +110,7 @@ singleton PostEffect( UnderwaterFogPostFx )
   
    shader = UnderwaterFogPassShader;
    stateBlock = UnderwaterFogPassStateBlock;
-   texture[0] = "#prepass";
+   texture[0] = "#deferred";
    texture[1] = "$backBuffer";
    texture[2] = "#waterDepthGradMap";
    

+ 1 - 1
Templates/Full/game/core/scripts/client/postFx/hdr.cs

@@ -172,7 +172,7 @@ singleton ShaderData( HDR_CombineShader )
    samplerNames[2] = "$bloomTex";
    samplerNames[3] = "$colorCorrectionTex";
    
-   samplerNames[4] = "prepassTex";
+   samplerNames[4] = "deferredTex";
 
    pixVersion = 3.0;
 };

+ 2 - 2
Templates/Full/game/core/scripts/client/postFx/lightRay.cs

@@ -39,7 +39,7 @@ singleton ShaderData( LightRayOccludeShader )
    OGLPixelShaderFile   = "shaders/common/postFx/lightRay/gl/lightRayOccludeP.glsl";
    
    samplerNames[0] = "$backBuffer";
-   samplerNames[1] = "$prepassTex";
+   samplerNames[1] = "$deferredTex";
 
    pixVersion = 3.0;   
 };
@@ -77,7 +77,7 @@ singleton PostEffect( LightRayPostFX )
    shader = LightRayOccludeShader;
    stateBlock = LightRayStateBlock;
    texture[0] = "$backBuffer";
-   texture[1] = "#prepass";
+   texture[1] = "#deferred";
    target = "$outTex";
    targetFormat = "GFXFormatR16G16B16A16F";
       

+ 7 - 7
Templates/Full/game/core/scripts/client/postFx/ssao.cs

@@ -156,7 +156,7 @@ singleton ShaderData( SSAOShader )
    OGLVertexShaderFile  = "shaders/common/postFx/gl/postFxV.glsl";
    OGLPixelShaderFile   = "shaders/common/postFx/ssao/gl/SSAO_P.glsl";
 
-   samplerNames[0] = "$prepassMap";
+   samplerNames[0] = "$deferredMap";
    samplerNames[1] = "$randNormalTex";
    samplerNames[2] = "$powTable";
    
@@ -172,7 +172,7 @@ singleton ShaderData( SSAOBlurYShader )
    OGLPixelShaderFile   = "shaders/common/postFx/ssao/gl/SSAO_Blur_P.glsl";
    
    samplerNames[0] = "$occludeMap";
-   samplerNames[1] = "$prepassMap";
+   samplerNames[1] = "$deferredMap";
 
    pixVersion = 3.0;      
    
@@ -199,7 +199,7 @@ singleton PostEffect( SSAOPostFx )
    shader = SSAOShader;
    stateBlock = SSAOStateBlock;
          
-   texture[0] = "#prepass";         
+   texture[0] = "#deferred";         
    texture[1] = "./noise.png";
    texture[2] = "#ssao_pow_table";
    
@@ -215,7 +215,7 @@ singleton PostEffect( SSAOPostFx )
       stateBlock = SSAOBlurStateBlock;
       
       texture[0] = "$inTex";
-      texture[1] = "#prepass";
+      texture[1] = "#deferred";
       
       target = "$outTex"; 
    };
@@ -228,7 +228,7 @@ singleton PostEffect( SSAOPostFx )
       stateBlock = SSAOBlurStateBlock;
       
       texture[0] = "$inTex";
-      texture[1] = "#prepass";
+      texture[1] = "#deferred";
       
       target = "$outTex"; 
    };   
@@ -241,7 +241,7 @@ singleton PostEffect( SSAOPostFx )
       stateBlock = SSAOBlurStateBlock;
             
       texture[0] = "$inTex";
-      texture[1] = "#prepass";
+      texture[1] = "#deferred";
       
       target = "$outTex"; 
    };
@@ -254,7 +254,7 @@ singleton PostEffect( SSAOPostFx )
       stateBlock = SSAOBlurStateBlock;
             
       texture[0] = "$inTex";
-      texture[1] = "#prepass";
+      texture[1] = "#deferred";
             
       // We write to a mask texture which is then
       // read by the lighting shaders to mask ambient.

+ 3 - 3
Templates/Full/game/core/scripts/client/shaders.cs

@@ -34,7 +34,7 @@ singleton ShaderData( ParticlesShaderData )
    OGLPixelShaderFile      = "shaders/common/gl/particlesP.glsl";
    
    samplerNames[0] = "$diffuseMap";
-   samplerNames[1] = "$prepassTex";
+   samplerNames[1] = "$deferredTex";
    samplerNames[2] = "$paraboloidLightMap";
    
    pixVersion = 2.0;
@@ -103,7 +103,7 @@ new ShaderData( fxFoliageReplicatorShader )
    pixVersion = 1.4;
 };
 
-singleton ShaderData( VolumetricFogPrePassShader )
+singleton ShaderData( VolumetricFogDeferredShader )
 {
    DXVertexShaderFile = "shaders/common/VolumetricFog/VFogPreV.hlsl";
    DXPixelShaderFile = "shaders/common/VolumetricFog/VFogPreP.hlsl";
@@ -121,7 +121,7 @@ singleton ShaderData( VolumetricFogShader )
    OGLVertexShaderFile  = "shaders/common/VolumetricFog/gl/VFogV.glsl";
    OGLPixelShaderFile   = "shaders/common/VolumetricFog/gl/VFogP.glsl";	
 	
-   samplerNames[0] = "$prepassTex";
+   samplerNames[0] = "$deferredTex";
    samplerNames[1] = "$depthBuffer";
    samplerNames[2] = "$frontBuffer";
    samplerNames[3] = "$density";

+ 6 - 6
Templates/Full/game/core/scripts/client/water.cs

@@ -35,7 +35,7 @@ singleton ShaderData( WaterShader )
    OGLPixelShaderFile = "shaders/common/water/gl/waterP.glsl";
    
    samplerNames[0] = "$bumpMap";  // noise
-   samplerNames[1] = "$prepassTex";  // #prepass
+   samplerNames[1] = "$deferredTex";  // #deferred
    samplerNames[2] = "$reflectMap"; // $reflectbuff
    samplerNames[3] = "$refractBuff";  // $backbuff
    samplerNames[4] = "$skyMap";  // $cubemap   
@@ -61,7 +61,7 @@ singleton GFXStateBlockData( WaterStateBlock )
 {
    samplersDefined = true;
    samplerStates[0] = WaterSampler;  // noise
-   samplerStates[1] = SamplerClampPoint;  // #prepass
+   samplerStates[1] = SamplerClampPoint;  // #deferred
    samplerStates[2] = SamplerClampLinear; // $reflectbuff
    samplerStates[3] = SamplerClampPoint;  // $backbuff
    samplerStates[4] = SamplerWrapLinear;  // $cubemap   
@@ -78,7 +78,7 @@ singleton GFXStateBlockData( UnderWaterStateBlock : WaterStateBlock )
 
 singleton CustomMaterial( WaterMat )
 {   
-   sampler["prepassTex"] = "#prepass";
+   sampler["deferredTex"] = "#deferred";
    sampler["reflectMap"] = "$reflectbuff";
    sampler["refractBuff"] = "$backbuff";
    // These samplers are set in code not here.
@@ -115,7 +115,7 @@ singleton CustomMaterial( UnderwaterMat )
    //sampler["bumpMap"] = "core/art/water/noise02";
    //sampler["foamMap"] = "core/art/water/foam";
 
-   sampler["prepassTex"] = "#prepass";
+   sampler["deferredTex"] = "#deferred";
    sampler["refractBuff"] = "$backbuff";   
    
    shader = UnderWaterShader;
@@ -171,7 +171,7 @@ singleton CustomMaterial( WaterBasicMat )
    //sampler["bumpMap"] = "core/art/water/noise02";
    //sampler["skyMap"] = "$cubemap";   
    
-   //sampler["prepassTex"] = "#prepass";
+   //sampler["deferredTex"] = "#deferred";
    sampler["reflectMap"] = "$reflectbuff";
    sampler["refractBuff"] = "$backbuff";
     
@@ -199,7 +199,7 @@ singleton CustomMaterial( UnderwaterBasicMat )
    //sampler["bumpMap"] = "core/art/water/noise02";
    //samplers["skyMap"] = "$cubemap";  
 
-   //sampler["prepassTex"] = "#prepass";
+   //sampler["deferredTex"] = "#deferred";
    sampler["refractBuff"] = "$backbuff";
    
    shader = UnderWaterBasicShader;

+ 2 - 2
Templates/Full/game/shaders/common/VolumetricFog/VFogP.hlsl

@@ -25,7 +25,7 @@
 #include "../shaderModelAutoGen.hlsl"
 #include "../torque.hlsl"
 
-TORQUE_UNIFORM_SAMPLER2D(prepassTex, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex, 0);
 TORQUE_UNIFORM_SAMPLER2D(depthBuffer, 1);
 TORQUE_UNIFORM_SAMPLER2D(frontBuffer, 2);
 TORQUE_UNIFORM_SAMPLER2D(density, 3);
@@ -56,7 +56,7 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0
 	float2 uvscreen=((IN.htpos.xy/IN.htpos.w) + 1.0 ) / 2.0;
 	uvscreen.y = 1.0 - uvscreen.y;
 	
-   float obj_test = TORQUE_PREPASS_UNCONDITION(prepassTex, uvscreen).w * preBias;
+   float obj_test = TORQUE_PREPASS_UNCONDITION(deferredTex, uvscreen).w * preBias;
    float depth = TORQUE_TEX2D(depthBuffer, uvscreen).r;
    float front = TORQUE_TEX2D(frontBuffer, uvscreen).r;
 

+ 1 - 1
Templates/Full/game/shaders/common/VolumetricFog/VFogPreP.hlsl

@@ -20,7 +20,7 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-// Volumetric Fog prepass pixel shader V1.00
+// Volumetric Fog deferred pixel shader V1.00
 #include "../shaderModel.hlsl"
 
 struct ConnectData

+ 1 - 1
Templates/Full/game/shaders/common/VolumetricFog/VFogPreV.hlsl

@@ -20,7 +20,7 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-// Volumetric Fog prepass vertex shader V1.00
+// Volumetric Fog deferred vertex shader V1.00
 
 #include "../shaderModel.hlsl"
 #include "../hlslStructs.hlsl"

+ 2 - 2
Templates/Full/game/shaders/common/VolumetricFog/gl/VFogP.glsl

@@ -24,7 +24,7 @@
 #include "shadergen:/autogenConditioners.h"
 #include "../../gl/torque.glsl"
 
-uniform sampler2D prepassTex;
+uniform sampler2D deferredTex;
 uniform sampler2D depthBuffer;
 uniform sampler2D frontBuffer;
 uniform sampler2D density;
@@ -52,7 +52,7 @@ void main()
 	vec2 uvscreen=((IN_hpos.xy/IN_hpos.w) + 1.0 ) / 2.0;
 	uvscreen.y = 1.0 - uvscreen.y;
 	
-	float obj_test = prepassUncondition( prepassTex, uvscreen).w * preBias;
+	float obj_test = deferredUncondition( deferredTex, uvscreen).w * preBias;
 	float depth = tex2D(depthBuffer,uvscreen).r;
 	float front = tex2D(frontBuffer,uvscreen).r;
 

+ 4 - 4
Templates/Full/game/shaders/common/gl/particlesP.glsl

@@ -34,9 +34,9 @@
    
    uniform float oneOverSoftness;
    uniform float oneOverFar;
-   uniform sampler2D prepassTex;   
+   uniform sampler2D deferredTex;   
    //uniform vec3 vEye;
-   uniform vec4 prePassTargetParams;
+   uniform vec4 deferredTargetParams;
 #endif
 
 #define CLIP_Z // TODO: Make this a proper macro
@@ -86,9 +86,9 @@ void main()
    
    #ifdef SOFTPARTICLES
       vec2 tc = IN_pos.xy * vec2(1.0, -1.0) / IN_pos.w;
-      tc = viewportCoordToRenderTarget(saturate( ( tc + 1.0 ) * 0.5 ), prePassTargetParams); 
+      tc = viewportCoordToRenderTarget(saturate( ( tc + 1.0 ) * 0.5 ), deferredTargetParams); 
    
-   	float sceneDepth = prepassUncondition( prepassTex, tc ).w;   	   	   			
+   	float sceneDepth = deferredUncondition( deferredTex, tc ).w;   	   	   			
    	float depth = IN_pos.w * oneOverFar;   	
 	float diff = sceneDepth - depth;
 	#ifdef CLIP_Z

+ 2 - 2
Templates/Full/game/shaders/common/lighting/advanced/dbgDepthVisualizeP.hlsl

@@ -23,11 +23,11 @@
 #include "../../postfx/postFx.hlsl"
 #include "../../shaderModelAutoGen.hlsl"
 
-TORQUE_UNIFORM_SAMPLER2D(prepassTex, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex, 0);
 TORQUE_UNIFORM_SAMPLER1D(depthViz, 1);
 
 float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
 {
-   float depth = TORQUE_PREPASS_UNCONDITION( prepassTex, IN.uv0 ).w;
+   float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w;
    return float4( TORQUE_TEX1D( depthViz, depth ).rgb, 1.0 );
 }

+ 2 - 2
Templates/Full/game/shaders/common/lighting/advanced/dbgLightColorVisualizeP.hlsl

@@ -23,10 +23,10 @@
 #include "../../shaderModelAutoGen.hlsl"
 #include "../../postfx/postFx.hlsl"
 
-TORQUE_UNIFORM_SAMPLER2D(lightPrePassTex,0);
+TORQUE_UNIFORM_SAMPLER2D(lightDeferredTex,0);
 
 float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
 {   
-   float4 lightColor = TORQUE_TEX2D( lightPrePassTex, IN.uv0 );    
+   float4 lightColor = TORQUE_TEX2D( lightDeferredTex, IN.uv0 );    
    return float4( lightColor.rgb, 1.0 );   
 }

+ 2 - 2
Templates/Full/game/shaders/common/lighting/advanced/dbgLightSpecularVisualizeP.hlsl

@@ -22,10 +22,10 @@
 
 #include "../../postfx/postFx.hlsl"
  
-TORQUE_UNIFORM_SAMPLER2D(lightPrePassTex,0);
+TORQUE_UNIFORM_SAMPLER2D(lightDeferredTex,0);
 
 float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
 {   
-   float specular = TORQUE_TEX2D( lightPrePassTex, IN.uv0 ).a;    
+   float specular = TORQUE_TEX2D( lightDeferredTex, IN.uv0 ).a;    
    return float4( specular, specular, specular, 1.0 );
 }

+ 2 - 2
Templates/Full/game/shaders/common/lighting/advanced/dbgNormalVisualizeP.hlsl

@@ -23,10 +23,10 @@
 #include "../../postfx/postFx.hlsl"
 #include "../../shaderModelAutoGen.hlsl"
 
-TORQUE_UNIFORM_SAMPLER2D(prepassTex, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex, 0);
 
 float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
 {   
-   float3 normal = TORQUE_PREPASS_UNCONDITION( prepassTex, IN.uv0 ).xyz;   
+   float3 normal = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).xyz;   
    return float4( ( normal + 1.0 ) * 0.5, 1.0 );
 }

+ 1 - 1
Templates/Full/game/shaders/common/lighting/advanced/deferredClearGBufferP.hlsl

@@ -41,7 +41,7 @@ Fragout main( Conn IN )
 {
    Fragout OUT;
    
-   // Clear Prepass Buffer ( Normals/Depth );
+   // Clear Deferred Buffer ( Normals/Depth );
    OUT.col =  float4(1.0, 1.0, 1.0, 1.0);
 
    // Clear Color Buffer.

+ 4 - 4
Templates/Full/game/shaders/common/lighting/advanced/deferredShadingP.hlsl

@@ -25,17 +25,17 @@
 #include "shaders/common/torque.hlsl"
 
 TORQUE_UNIFORM_SAMPLER2D(colorBufferTex,0);
-TORQUE_UNIFORM_SAMPLER2D(lightPrePassTex,1);
+TORQUE_UNIFORM_SAMPLER2D(lightDeferredTex,1);
 TORQUE_UNIFORM_SAMPLER2D(matInfoTex,2);
-TORQUE_UNIFORM_SAMPLER2D(prepassTex,3);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex,3);
 
 float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
 {        
-   float4 lightBuffer = TORQUE_TEX2D( lightPrePassTex, IN.uv0 );
+   float4 lightBuffer = TORQUE_TEX2D( lightDeferredTex, IN.uv0 );
    float4 colorBuffer = TORQUE_TEX2D( colorBufferTex, IN.uv0 );
    float4 matInfo = TORQUE_TEX2D( matInfoTex, IN.uv0 );
    float specular = saturate(lightBuffer.a);
-   float depth = TORQUE_PREPASS_UNCONDITION( prepassTex, IN.uv0 ).w;
+   float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w;
 
    if (depth>0.9999)
       return float4(0,0,0,0);

+ 2 - 2
Templates/Full/game/shaders/common/lighting/advanced/gl/dbgDepthVisualizeP.glsl

@@ -24,13 +24,13 @@
 #include "shadergen:/autogenConditioners.h"
 
 in vec2 uv0;
-uniform sampler2D prepassTex;
+uniform sampler2D deferredTex;
 uniform sampler1D depthViz;
 
 out vec4 OUT_col;
 
 void main()
 {
-   float depth = prepassUncondition( prepassTex, uv0 ).w;
+   float depth = deferredUncondition( deferredTex, uv0 ).w;
    OUT_col = vec4( texture( depthViz, depth ).rgb, 1.0 );
 }

+ 2 - 2
Templates/Full/game/shaders/common/lighting/advanced/gl/dbgLightColorVisualizeP.glsl

@@ -23,12 +23,12 @@
 #include "../../../gl/hlslCompat.glsl"
 
 in vec2 uv0;
-uniform sampler2D lightPrePassTex;
+uniform sampler2D lightDeferredTex;
 
 out vec4 OUT_col;
 
 void main()
 {
-   vec4 lightColor = texture( lightPrePassTex, uv0 );
+   vec4 lightColor = texture( lightDeferredTex, uv0 );
    OUT_col = vec4( lightColor.rgb, 1.0 );
 }

+ 2 - 2
Templates/Full/game/shaders/common/lighting/advanced/gl/dbgLightSpecularVisualizeP.glsl

@@ -23,12 +23,12 @@
 #include "../../../gl/hlslCompat.glsl"
 
 in vec2 uv0;
-uniform sampler2D lightPrePassTex;
+uniform sampler2D lightDeferredTex;
 
 out vec4 OUT_col;
 
 void main()
 {
-   float specular = texture( lightPrePassTex, uv0 ).a;
+   float specular = texture( lightDeferredTex, uv0 ).a;
    OUT_col = vec4( specular, specular, specular, 1.0 );
 }

+ 2 - 2
Templates/Full/game/shaders/common/lighting/advanced/gl/dbgNormalVisualizeP.glsl

@@ -24,12 +24,12 @@
 #include "shadergen:/autogenConditioners.h"
 
 in vec2 uv0;
-uniform sampler2D prepassTex;
+uniform sampler2D deferredTex;
 
 out vec4 OUT_col;
 
 void main()
 {   
-   vec3 normal = prepassUncondition( prepassTex, uv0 ).xyz;
+   vec3 normal = deferredUncondition( deferredTex, uv0 ).xyz;
    OUT_col = vec4( ( normal + 1.0 ) * 0.5, 1.0 );
 }

+ 1 - 1
Templates/Full/game/shaders/common/lighting/advanced/gl/deferredClearGBufferP.glsl

@@ -29,7 +29,7 @@ out vec4 OUT_col2;
 //-----------------------------------------------------------------------------
 void main()
 {    
-   // Clear Prepass Buffer ( Normals/Depth );
+   // Clear Deferred Buffer ( Normals/Depth );
    OUT_col =  vec4(1.0, 1.0, 1.0, 1.0);
 
    // Clear Color Buffer.

+ 4 - 4
Templates/Full/game/shaders/common/lighting/advanced/gl/deferredShadingP.glsl

@@ -26,21 +26,21 @@
 #include "../../../gl/torque.glsl"
 
 uniform sampler2D colorBufferTex;
-uniform sampler2D lightPrePassTex;
+uniform sampler2D lightDeferredTex;
 uniform sampler2D matInfoTex;
-uniform sampler2D prepassTex;
+uniform sampler2D deferredTex;
 
 out vec4 OUT_col;
 
 void main()
 {
-   float depth = prepassUncondition( prepassTex, uv0 ).w;
+   float depth = deferredUncondition( deferredTex, uv0 ).w;
    if (depth>0.9999)
    {
       OUT_col = vec4(0.0);
       return;
    }
-   vec4 lightBuffer = texture( lightPrePassTex, uv0 );
+   vec4 lightBuffer = texture( lightDeferredTex, uv0 );
    vec4 colorBuffer = texture( colorBufferTex, uv0 );
    vec4 matInfo = texture( matInfoTex, uv0 );
    float specular = clamp(lightBuffer.a,0.0,1.0);

+ 4 - 4
Templates/Full/game/shaders/common/lighting/advanced/gl/pointLightP.glsl

@@ -103,7 +103,7 @@ uniform samplerCube cookieMap ;
 
 #endif
 
-uniform sampler2D prePassBuffer;
+uniform sampler2D deferredBuffer;
 
 #ifdef SHADOW_CUBE
 	uniform samplerCube shadowMap;
@@ -159,9 +159,9 @@ void main()
 	}
 	
    // Sample/unpack the normal/z data
-   vec4 prepassSample = prepassUncondition( prePassBuffer, uvScene );
-   vec3 normal = prepassSample.rgb;
-   float depth = prepassSample.a;
+   vec4 deferredSample = deferredUncondition( deferredBuffer, uvScene );
+   vec3 normal = deferredSample.rgb;
+   float depth = deferredSample.a;
    
    // Eye ray - Eye -> Pixel
    vec3 eyeRay = getDistanceVectorToPlane( -vsFarPlane.w, vsEyeDir.xyz, vsFarPlane );

+ 4 - 4
Templates/Full/game/shaders/common/lighting/advanced/gl/spotLightP.glsl

@@ -46,7 +46,7 @@ uniform sampler2D cookieMap;
 
 #endif
 
-uniform sampler2D prePassBuffer;
+uniform sampler2D deferredBuffer;
 uniform sampler2D shadowMap;
 uniform sampler2D dynamicShadowMap;
 
@@ -101,9 +101,9 @@ void main()
 	}
 	
    // Sample/unpack the normal/z data
-   vec4 prepassSample = prepassUncondition( prePassBuffer, uvScene );
-   vec3 normal = prepassSample.rgb;
-   float depth = prepassSample.a;
+   vec4 deferredSample = deferredUncondition( deferredBuffer, uvScene );
+   vec3 normal = deferredSample.rgb;
+   float depth = deferredSample.a;
    
    // Eye ray - Eye -> Pixel
    vec3 eyeRay = getDistanceVectorToPlane( -vsFarPlane.w, IN_vsEyeDir.xyz, vsFarPlane );

+ 4 - 4
Templates/Full/game/shaders/common/lighting/advanced/gl/vectorLightP.glsl

@@ -42,7 +42,7 @@ uniform sampler2D ssaoMask ;
 uniform vec4 rtParams3;
 #endif
 
-uniform sampler2D prePassBuffer;
+uniform sampler2D deferredBuffer;
 uniform sampler2D lightBuffer;
 uniform sampler2D colorBuffer;
 uniform sampler2D matInfoBuffer;             
@@ -214,9 +214,9 @@ void main()
 	}
 	
    // Sample/unpack the normal/z data
-   vec4 prepassSample = prepassUncondition( prePassBuffer, uv0 );
-   vec3 normal = prepassSample.rgb;
-   float depth = prepassSample.a;
+   vec4 deferredSample = deferredUncondition( deferredBuffer, uv0 );
+   vec3 normal = deferredSample.rgb;
+   float depth = deferredSample.a;
 
    // Use eye ray to get ws pos
    vec4 worldPos = vec4(eyePosWorld + wsEyeRay * depth, 1.0f);

+ 4 - 4
Templates/Full/game/shaders/common/lighting/advanced/particlePointLightP.hlsl

@@ -34,7 +34,7 @@ struct ConvexConnectP
    float3 vsEyeDir : TEXCOORD1;
 };
 
-TORQUE_UNIFORM_SAMPLER2D(prePassBuffer, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredBuffer, 0);
 
 uniform float4 lightPosition;
 uniform float4 lightColor;
@@ -49,9 +49,9 @@ float4 main(   ConvexConnectP IN ) : TORQUE_TARGET0
    float2 uvScene = getUVFromSSPos(ssPos, rtParams0);
    
    // Sample/unpack the normal/z data
-   float4 prepassSample = TORQUE_PREPASS_UNCONDITION(prePassBuffer, uvScene);
-   float3 normal = prepassSample.rgb;
-   float depth = prepassSample.a;
+   float4 deferredSample = TORQUE_PREPASS_UNCONDITION(deferredBuffer, uvScene);
+   float3 normal = deferredSample.rgb;
+   float depth = deferredSample.a;
    
    // Eye ray - Eye -> Pixel
    float3 eyeRay = getDistanceVectorToPlane(-vsFarPlane.w, IN.vsEyeDir, vsFarPlane);

+ 4 - 4
Templates/Full/game/shaders/common/lighting/advanced/pointLightP.hlsl

@@ -106,7 +106,7 @@ TORQUE_UNIFORM_SAMPLERCUBE(cookieMap, 3);
 
 #endif
 
-TORQUE_UNIFORM_SAMPLER2D(prePassBuffer, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredBuffer, 0);
 
 #ifdef SHADOW_CUBE
 TORQUE_UNIFORM_SAMPLERCUBE(shadowMap, 1);
@@ -161,9 +161,9 @@ float4 main( ConvexConnectP IN ) : TORQUE_TARGET0
 	}
    
    // Sample/unpack the normal/z data
-   float4 prepassSample = TORQUE_PREPASS_UNCONDITION( prePassBuffer, uvScene );
-   float3 normal = prepassSample.rgb;
-   float depth = prepassSample.a;
+   float4 deferredSample = TORQUE_PREPASS_UNCONDITION( deferredBuffer, uvScene );
+   float3 normal = deferredSample.rgb;
+   float depth = deferredSample.a;
    
    // Eye ray - Eye -> Pixel
    float3 eyeRay = getDistanceVectorToPlane( -vsFarPlane.w, IN.vsEyeDir.xyz, vsFarPlane );

+ 4 - 4
Templates/Full/game/shaders/common/lighting/advanced/spotLightP.hlsl

@@ -38,7 +38,7 @@ struct ConvexConnectP
    float4 vsEyeDir : TEXCOORD2;
 };
 
-TORQUE_UNIFORM_SAMPLER2D(prePassBuffer, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredBuffer, 0);
 TORQUE_UNIFORM_SAMPLER2D(shadowMap, 1);
 TORQUE_UNIFORM_SAMPLER2D(dynamicShadowMap,2);
 
@@ -99,9 +99,9 @@ float4 main(   ConvexConnectP IN ) : TORQUE_TARGET0
 	}
 	
    // Sample/unpack the normal/z data
-   float4 prepassSample = TORQUE_PREPASS_UNCONDITION( prePassBuffer, uvScene );
-   float3 normal = prepassSample.rgb;
-   float depth = prepassSample.a;
+   float4 deferredSample = TORQUE_PREPASS_UNCONDITION( deferredBuffer, uvScene );
+   float3 normal = deferredSample.rgb;
+   float depth = deferredSample.a;
    
    // Eye ray - Eye -> Pixel
    float3 eyeRay = getDistanceVectorToPlane( -vsFarPlane.w, IN.vsEyeDir.xyz, vsFarPlane );

+ 4 - 4
Templates/Full/game/shaders/common/lighting/advanced/vectorLightP.hlsl

@@ -30,7 +30,7 @@
 #include "../shadowMap/shadowMapIO_HLSL.h"
 #include "softShadow.hlsl"
 
-TORQUE_UNIFORM_SAMPLER2D(prePassBuffer, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredBuffer, 0);
 TORQUE_UNIFORM_SAMPLER2D(shadowMap, 1);
 TORQUE_UNIFORM_SAMPLER2D(dynamicShadowMap, 2);
 
@@ -213,9 +213,9 @@ float4 main( FarFrustumQuadConnectP IN ) : TORQUE_TARGET0
          subsurface = float3(0.337255, 0.772549, 0.262745);
 	}
    // Sample/unpack the normal/z data
-   float4 prepassSample = TORQUE_PREPASS_UNCONDITION( prePassBuffer, IN.uv0 );
-   float3 normal = prepassSample.rgb;
-   float depth = prepassSample.a;
+   float4 deferredSample = TORQUE_PREPASS_UNCONDITION( deferredBuffer, IN.uv0 );
+   float3 normal = deferredSample.rgb;
+   float depth = deferredSample.a;
 
    // Use eye ray to get ws pos
    float4 worldPos = float4(eyePosWorld + IN.wsEyeRay * depth, 1.0f);

+ 4 - 4
Templates/Full/game/shaders/common/particlesP.hlsl

@@ -33,9 +33,9 @@
    
    uniform float oneOverSoftness;
    uniform float oneOverFar;
-   TORQUE_UNIFORM_SAMPLER2D(prepassTex, 1);
+   TORQUE_UNIFORM_SAMPLER2D(deferredTex, 1);
    //uniform float3 vEye;
-   uniform float4 prePassTargetParams;
+   uniform float4 deferredTargetParams;
 #endif
 
 #define CLIP_Z // TODO: Make this a proper macro
@@ -82,9 +82,9 @@ float4 main( Conn IN ) : TORQUE_TARGET0
    
    #ifdef SOFTPARTICLES
       float2 tc = IN.pos.xy * float2(1.0, -1.0) / IN.pos.w;
-      tc = viewportCoordToRenderTarget(saturate( ( tc + 1.0 ) * 0.5 ), prePassTargetParams); 
+      tc = viewportCoordToRenderTarget(saturate( ( tc + 1.0 ) * 0.5 ), deferredTargetParams); 
    
-      float sceneDepth = TORQUE_PREPASS_UNCONDITION(prepassTex, tc).w;
+      float sceneDepth = TORQUE_PREPASS_UNCONDITION(deferredTex, tc).w;
    	float depth = IN.pos.w * oneOverFar;   	
 	float diff = sceneDepth - depth;
 	#ifdef CLIP_Z

+ 4 - 4
Templates/Full/game/shaders/common/postFx/caustics/causticsP.hlsl

@@ -28,7 +28,7 @@ uniform float3    eyePosWorld;
 uniform float4    rtParams0;
 uniform float4    waterFogPlane;
 
-TORQUE_UNIFORM_SAMPLER2D(prepassTex, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex, 0);
 TORQUE_UNIFORM_SAMPLER2D(causticsTex0, 1);
 TORQUE_UNIFORM_SAMPLER2D(causticsTex1, 2);
 
@@ -40,10 +40,10 @@ float distanceToPlane(float4 plane, float3 pos)
 float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
 {   
    //Sample the pre-pass
-   float4 prePass = TORQUE_PREPASS_UNCONDITION( prepassTex, IN.uv0 );
+   float4 deferred = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 );
    
    //Get depth
-   float depth = prePass.w;   
+   float depth = deferred.w;   
    if(depth > 0.9999)
       return float4(0,0,0,0);
    
@@ -71,7 +71,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
    
    //Use normal Z to modulate caustics  
    //float waterDepth = 1 - saturate(pos.z + waterFogPlane.w + 1);
-   caustics *= saturate(prePass.z) * pow(abs(1-depth), 64) * waterDepth; 
+   caustics *= saturate(deferred.z) * pow(abs(1-depth), 64) * waterDepth; 
       
    return caustics;   
 }

+ 4 - 4
Templates/Full/game/shaders/common/postFx/caustics/gl/causticsP.glsl

@@ -29,7 +29,7 @@ uniform vec4    rtParams0;
 uniform vec4    waterFogPlane;
 uniform float     accumTime;
 
-uniform sampler2D prepassTex;
+uniform sampler2D deferredTex;
 uniform sampler2D causticsTex0;
 uniform sampler2D causticsTex1;
 uniform vec2 targetSize;
@@ -44,10 +44,10 @@ float distanceToPlane(vec4 plane, vec3 pos)
 void main()             
 {   
    //Sample the pre-pass
-   vec4 prePass = prepassUncondition( prepassTex, IN_uv0 );
+   vec4 deferred = deferredUncondition( deferredTex, IN_uv0 );
    
    //Get depth
-   float depth = prePass.w;   
+   float depth = deferred.w;   
    if(depth > 0.9999)
    {
       OUT_col = vec4(0,0,0,0);
@@ -81,7 +81,7 @@ void main()
    
    //Use normal Z to modulate caustics  
    //float waterDepth = 1 - saturate(pos.z + waterFogPlane.w + 1);
-   caustics *= saturate(prePass.z) * pow(1-depth, 64) * waterDepth; 
+   caustics *= saturate(deferred.z) * pow(1-depth, 64) * waterDepth; 
       
    OUT_col = caustics;   
 }

+ 4 - 4
Templates/Full/game/shaders/common/postFx/dof/gl/DOF_DownSample_P.glsl

@@ -87,10 +87,10 @@ void main()
    coc = half4(0);
    for ( int i = 0; i < 4; i++ )
    {
-      depth[0] = prepassUncondition( depthSampler, ( IN_tcDepth0.xy + rowOfs[i] ) ).w;
-      depth[1] = prepassUncondition( depthSampler, ( IN_tcDepth1.xy + rowOfs[i] ) ).w;
-      depth[2] = prepassUncondition( depthSampler, ( IN_tcDepth2.xy + rowOfs[i] ) ).w;
-      depth[3] = prepassUncondition( depthSampler, ( IN_tcDepth3.xy + rowOfs[i] ) ).w;
+      depth[0] = deferredUncondition( depthSampler, ( IN_tcDepth0.xy + rowOfs[i] ) ).w;
+      depth[1] = deferredUncondition( depthSampler, ( IN_tcDepth1.xy + rowOfs[i] ) ).w;
+      depth[2] = deferredUncondition( depthSampler, ( IN_tcDepth2.xy + rowOfs[i] ) ).w;
+      depth[3] = deferredUncondition( depthSampler, ( IN_tcDepth3.xy + rowOfs[i] ) ).w;
       
       // @todo OPENGL INTEL need review
       coc = max( coc, clamp( half4(dofEqWorld.x) * depth + half4(dofEqWorld.y), half4(0.0), half4(maxWorldCoC) ) );  

+ 1 - 1
Templates/Full/game/shaders/common/postFx/dof/gl/DOF_Final_P.glsl

@@ -117,7 +117,7 @@ void main()
    //med.rgb = large;
    
    //nearCoc = 0;
-   depth = prepassUncondition( depthSampler, IN_uv3 ).w;  
+   depth = deferredUncondition( depthSampler, IN_uv3 ).w;  
    //return half4(depth.rrr,1);
    //return half4(nearCoc.rrr,1.0);
    

+ 2 - 2
Templates/Full/game/shaders/common/postFx/edgeaa/edgeDetectP.hlsl

@@ -23,7 +23,7 @@
 #include "../postFx.hlsl"
 #include "../../shaderModelAutoGen.hlsl"
 
-TORQUE_UNIFORM_SAMPLER2D(prepassBuffer,0);
+TORQUE_UNIFORM_SAMPLER2D(deferredBuffer,0);
 
 // GPU Gems 3, pg 443-444
 float GetEdgeWeight(float2 uv0, in float2 targetSize)
@@ -50,7 +50,7 @@ float GetEdgeWeight(float2 uv0, in float2 targetSize)
    for(int i = 0; i < 9; i++)
    {
       float2 uv = uv0 + offsets[i] * PixelSize;
-      float4 gbSample = TORQUE_PREPASS_UNCONDITION( prepassBuffer, uv );
+      float4 gbSample = TORQUE_PREPASS_UNCONDITION( deferredBuffer, uv );
       Depth[i] = gbSample.a;
       Normal[i] = gbSample.rgb;
    }

+ 4 - 4
Templates/Full/game/shaders/common/postFx/edgeaa/gl/edgeDetectP.glsl

@@ -24,7 +24,7 @@
 #include "shadergen:/autogenConditioners.h"
 
 // GPU Gems 3, pg 443-444
-float GetEdgeWeight(vec2 uv0, in sampler2D prepassBuffer, in vec2 targetSize)
+float GetEdgeWeight(vec2 uv0, in sampler2D deferredBuffer, in vec2 targetSize)
 {
    vec2 offsets[9] = vec2[](
       vec2( 0.0,  0.0),
@@ -47,7 +47,7 @@ float GetEdgeWeight(vec2 uv0, in sampler2D prepassBuffer, in vec2 targetSize)
    for(int i = 0; i < 9; i++)
    {
       vec2 uv = uv0 + offsets[i] * PixelSize;
-      vec4 gbSample = prepassUncondition( prepassBuffer, uv );
+      vec4 gbSample = deferredUncondition( deferredBuffer, uv );
       Depth[i] = gbSample.a;
       Normal[i] = gbSample.rgb;
    }
@@ -85,12 +85,12 @@ float GetEdgeWeight(vec2 uv0, in sampler2D prepassBuffer, in vec2 targetSize)
 in vec2 uv0;
 #define IN_uv0 uv0
 
-uniform sampler2D prepassBuffer;
+uniform sampler2D deferredBuffer;
 uniform vec2 targetSize;
 
 out vec4 OUT_col;
 
 void main()
 {
-   OUT_col = vec4( GetEdgeWeight(IN_uv0, prepassBuffer, targetSize ) );//rtWidthHeightInvWidthNegHeight.zw);
+   OUT_col = vec4( GetEdgeWeight(IN_uv0, deferredBuffer, targetSize ) );//rtWidthHeightInvWidthNegHeight.zw);
 }

+ 3 - 3
Templates/Full/game/shaders/common/postFx/fogP.hlsl

@@ -25,7 +25,7 @@
 #include "./../torque.hlsl"
 #include "./../shaderModelAutoGen.hlsl"
 
-TORQUE_UNIFORM_SAMPLER2D(prepassTex, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex, 0);
 uniform float3    eyePosWorld;
 uniform float4    fogColor;
 uniform float3    fogData;
@@ -33,8 +33,8 @@ uniform float4    rtParams0;
 
 float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
 {   
-   //float2 prepassCoord = ( IN.uv0.xy * rtParams0.zw ) + rtParams0.xy;   
-   float depth = TORQUE_PREPASS_UNCONDITION( prepassTex, IN.uv0 ).w;
+   //float2 deferredCoord = ( IN.uv0.xy * rtParams0.zw ) + rtParams0.xy;   
+   float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w;
    //return float4( depth, 0, 0, 0.7 );
    
    float factor = computeSceneFog( eyePosWorld,

+ 3 - 3
Templates/Full/game/shaders/common/postFx/gl/fogP.glsl

@@ -25,7 +25,7 @@
 #include "shadergen:/autogenConditioners.h"
 #include "../../gl/torque.glsl"
 
-uniform sampler2D prepassTex ;
+uniform sampler2D deferredTex ;
 uniform vec3    eyePosWorld;
 uniform vec4    fogColor;
 uniform vec3    fogData;
@@ -38,8 +38,8 @@ out vec4 OUT_col;
 
 void main()
 {   
-   //vec2 prepassCoord = ( uv0.xy * rtParams0.zw ) + rtParams0.xy;   
-   float depth = prepassUncondition( prepassTex, uv0 ).w;
+   //vec2 deferredCoord = ( uv0.xy * rtParams0.zw ) + rtParams0.xy;   
+   float depth = deferredUncondition( deferredTex, uv0 ).w;
    //return vec4( depth, 0, 0, 0.7 );
    
    float factor = computeSceneFog( eyePosWorld,

+ 4 - 4
Templates/Full/game/shaders/common/postFx/gl/motionBlurP.glsl

@@ -35,7 +35,7 @@ uniform mat4 matWorldToScreen;
 uniform float velocityMultiplier;
 
 uniform sampler2D backBuffer;
-uniform sampler2D prepassTex;
+uniform sampler2D deferredTex;
 
 out vec4 OUT_col;
 
@@ -44,11 +44,11 @@ void main()
    vec2 IN_uv0 = _IN_uv0;
    float samples = 5;
    
-   // First get the prepass texture for uv channel 0
-   vec4 prepass = prepassUncondition( prepassTex, IN_uv0 );
+   // First get the deferred texture for uv channel 0
+   vec4 deferred = deferredUncondition( deferredTex, IN_uv0 );
    
    // Next extract the depth
-   float depth = prepass.a;
+   float depth = deferred.a;
    
    // Create the screen position
    vec4 screenPos = vec4(IN_uv0.x*2-1, IN_uv0.y*2-1, depth*2-1, 1);

+ 3 - 3
Templates/Full/game/shaders/common/postFx/gl/underwaterFogP.glsl

@@ -39,7 +39,7 @@
 // Uniforms                                                                  
 //-----------------------------------------------------------------------------
 
-uniform sampler2D prepassTex ; 
+uniform sampler2D deferredTex ; 
 uniform sampler2D backbuffer ;
 uniform sampler1D waterDepthGradMap;
 uniform vec3    eyePosWorld;
@@ -55,9 +55,9 @@ out vec4 OUT_col;
 
 void main() 
 {    
-   //vec2 prepassCoord = IN_uv0;
+   //vec2 deferredCoord = IN_uv0;
    //IN_uv0 = ( IN_uv0.xy * rtParams0.zw ) + rtParams0.xy;
-   float depth = prepassUncondition( prepassTex, IN_uv0 ).w;
+   float depth = deferredUncondition( deferredTex, IN_uv0 ).w;
    //return vec4( depth.rrr, 1 );
    
    // Skip fogging the extreme far plane so that 

+ 2 - 2
Templates/Full/game/shaders/common/postFx/lightRay/gl/lightRayOccludeP.glsl

@@ -25,7 +25,7 @@
 #include "../../gl/postFX.glsl"
 
 uniform sampler2D backBuffer;   // The original backbuffer.
-uniform sampler2D prepassTex;   // The pre-pass depth and normals.
+uniform sampler2D deferredTex;   // The pre-pass depth and normals.
 
 uniform float brightScalar;
 
@@ -38,7 +38,7 @@ void main()
     vec4 col = vec4( 0, 0, 0, 1 );
     
     // Get the depth at this pixel.
-    float depth = prepassUncondition( prepassTex, IN_uv0 ).w;
+    float depth = deferredUncondition( deferredTex, IN_uv0 ).w;
     
     // If the depth is equal to 1.0, read from the backbuffer
     // and perform the exposure calculation on the result.

+ 2 - 2
Templates/Full/game/shaders/common/postFx/lightRay/lightRayOccludeP.hlsl

@@ -24,7 +24,7 @@
 #include "../postFx.hlsl"
 
 TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
-TORQUE_UNIFORM_SAMPLER2D(prepassTex, 1);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex, 1);
 
 uniform float brightScalar;
 
@@ -36,7 +36,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
     float4 col = float4( 0, 0, 0, 1 );
     
     // Get the depth at this pixel.
-    float depth = TORQUE_PREPASS_UNCONDITION( prepassTex, IN.uv0 ).w;
+    float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w;
     
     // If the depth is equal to 1.0, read from the backbuffer
     // and perform the exposure calculation on the result.

+ 7 - 7
Templates/Full/game/shaders/common/postFx/mlaa/edgeDetectionP.hlsl

@@ -29,7 +29,7 @@
 #include "shadergen:/autogenConditioners.h"
 
 uniform sampler2D colorMapG  : register(S0);
-uniform sampler2D prepassMap : register(S1);
+uniform sampler2D deferredMap : register(S1);
 
 uniform float3 lumaCoefficients;
 uniform float threshold;
@@ -43,7 +43,7 @@ float4 main(   float2 texcoord : TEXCOORD0,
    //
    // Note that there is a lot of overlapped luma calculations; performance
    // can be improved if this luma calculation is performed in the main pass,
-   // which may give you an edge if used in conjunction with a z prepass.
+   // which may give you an edge if used in conjunction with a z deferred.
 
    float L = dot(tex2D(colorMapG, texcoord).rgb, lumaCoefficients);
 
@@ -56,11 +56,11 @@ float4 main(   float2 texcoord : TEXCOORD0,
    float4 edges = step(threshold, delta);
 
    // Add depth edges to color edges
-   float D = prepassUncondition(prepassMap, texcoord).w;
-   float Dleft = prepassUncondition(prepassMap, offset[0].xy).w;
-   float Dtop  = prepassUncondition(prepassMap, offset[0].zw).w;
-   float Dright = prepassUncondition(prepassMap, offset[1].xy).w;
-   float Dbottom = prepassUncondition(prepassMap, offset[1].zw).w;
+   float D = deferredUncondition(deferredMap, texcoord).w;
+   float Dleft = deferredUncondition(deferredMap, offset[0].xy).w;
+   float Dtop  = deferredUncondition(deferredMap, offset[0].zw).w;
+   float Dright = deferredUncondition(deferredMap, offset[1].xy).w;
+   float Dbottom = deferredUncondition(deferredMap, offset[1].zw).w;
 
    delta = abs(D.xxxx - float4(Dleft, Dtop, Dright, Dbottom));
    edges += step(depthThreshold, delta);

+ 7 - 7
Templates/Full/game/shaders/common/postFx/mlaa/gl/edgeDetectionP.glsl

@@ -30,7 +30,7 @@
 #include "shadergen:/autogenConditioners.h"
 
 uniform sampler2D colorMapG;
-uniform sampler2D prepassMap;
+uniform sampler2D deferredMap;
 
 uniform vec3 lumaCoefficients;
 uniform float threshold;
@@ -47,7 +47,7 @@ void main()
    //
    // Note that there is a lot of overlapped luma calculations; performance
    // can be improved if this luma calculation is performed in the main pass,
-   // which may give you an edge if used in conjunction with a z prepass.
+   // which may give you an edge if used in conjunction with a z deferred.
 
    float L = dot(texture(colorMapG, texcoord).rgb, lumaCoefficients);
 
@@ -60,11 +60,11 @@ void main()
    vec4 edges = step(threshold, delta);
 
    // Add depth edges to color edges
-   float D = prepassUncondition(prepassMap, texcoord).w;
-   float Dleft = prepassUncondition(prepassMap, offset[0].xy).w;
-   float Dtop  = prepassUncondition(prepassMap, offset[0].zw).w;
-   float Dright = prepassUncondition(prepassMap, offset[1].xy).w;
-   float Dbottom = prepassUncondition(prepassMap, offset[1].zw).w;
+   float D = deferredUncondition(deferredMap, texcoord).w;
+   float Dleft = deferredUncondition(deferredMap, offset[0].xy).w;
+   float Dtop  = deferredUncondition(deferredMap, offset[0].zw).w;
+   float Dright = deferredUncondition(deferredMap, offset[1].xy).w;
+   float Dbottom = deferredUncondition(deferredMap, offset[1].zw).w;
 
    delta = abs(vec4(D) - vec4(Dleft, Dtop, Dright, Dbottom));
    edges += step(depthThreshold, delta);

+ 4 - 4
Templates/Full/game/shaders/common/postFx/motionBlurP.hlsl

@@ -30,17 +30,17 @@ uniform float4x4 matWorldToScreen;
 // Passed in from setShaderConsts()
 uniform float velocityMultiplier;
 TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
-TORQUE_UNIFORM_SAMPLER2D(prepassTex, 1);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex, 1);
 
 float4 main(PFXVertToPix IN) : TORQUE_TARGET0
 {
    float samples = 5;
    
-   // First get the prepass texture for uv channel 0
-   float4 prepass = TORQUE_PREPASS_UNCONDITION( prepassTex, IN.uv0 );
+   // First get the deferred texture for uv channel 0
+   float4 deferred = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 );
    
    // Next extract the depth
-   float depth = prepass.a;
+   float depth = deferred.a;
    
    // Create the screen position
    float4 screenPos = float4(IN.uv0.x*2-1, IN.uv0.y*2-1, depth*2-1, 1);

+ 3 - 3
Templates/Full/game/shaders/common/postFx/ssao/SSAO_Blur_P.hlsl

@@ -24,7 +24,7 @@
 #include "./../postFx.hlsl"
 
 TORQUE_UNIFORM_SAMPLER2D(occludeMap, 0);
-TORQUE_UNIFORM_SAMPLER2D(prepassMap, 1);
+TORQUE_UNIFORM_SAMPLER2D(deferredMap, 1);
 
 struct VertToPix
 {
@@ -49,7 +49,7 @@ uniform float blurNormalTol;
 void sample( float2 uv, float weight, float4 centerTap, inout int usedCount, inout float occlusion, inout float total )
 {
    //return;
-   float4 tap = TORQUE_PREPASS_UNCONDITION( prepassMap, uv );   
+   float4 tap = TORQUE_PREPASS_UNCONDITION( deferredMap, uv );   
    
    if ( abs( tap.a - centerTap.a ) < blurDepthTol )
    {
@@ -65,7 +65,7 @@ void sample( float2 uv, float weight, float4 centerTap, inout int usedCount, ino
 float4 main( VertToPix IN ) : TORQUE_TARGET0
 {   
    //float4 centerTap;
-   float4 centerTap = TORQUE_PREPASS_UNCONDITION( prepassMap, IN.uv0.zw );
+   float4 centerTap = TORQUE_PREPASS_UNCONDITION( deferredMap, IN.uv0.zw );
    
    //return centerTap;
    

+ 6 - 6
Templates/Full/game/shaders/common/postFx/ssao/SSAO_P.hlsl

@@ -26,7 +26,7 @@
 #define DOSMALL
 #define DOLARGE
 
-TORQUE_UNIFORM_SAMPLER2D(prepassMap,0);
+TORQUE_UNIFORM_SAMPLER2D(deferredMap,0);
 TORQUE_UNIFORM_SAMPLER2D(randNormalTex,1);
 TORQUE_UNIFORM_SAMPLER1D(powTable,2);
 
@@ -143,9 +143,9 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
    float3 reflectNormal = normalize( TORQUE_TEX2DLOD( randNormalTex, noiseMapUV ).xyz * 2.0 - 1.0 );   
    //return float4( reflectNormal, 1 );
    
-   float4 prepass = TORQUE_PREPASS_UNCONDITION( prepassMap, IN.uv0 );
-   float3 normal = prepass.xyz;
-   float depth = prepass.a;
+   float4 deferred = TORQUE_PREPASS_UNCONDITION( deferredMap, IN.uv0 );
+   float3 normal = deferred.xyz;
+   float depth = deferred.a;
    //return float4( ( depth ).xxx, 1 );
       
    // Early out if too far away.
@@ -197,7 +197,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
        
       se = ep + ray;
             
-      occluderFragment = TORQUE_PREPASS_UNCONDITION( prepassMap, se.xy );                  
+      occluderFragment = TORQUE_PREPASS_UNCONDITION( deferredMap, se.xy );                  
       
       depthDiff = se.z - occluderFragment.a; 
       
@@ -246,7 +246,7 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
        
       se = ep + ray;
             
-      occluderFragment = TORQUE_PREPASS_UNCONDITION( prepassMap, se.xy );                  
+      occluderFragment = TORQUE_PREPASS_UNCONDITION( deferredMap, se.xy );                  
       
       depthDiff = se.z - occluderFragment.a;       
       

+ 3 - 3
Templates/Full/game/shaders/common/postFx/ssao/gl/SSAO_Blur_P.glsl

@@ -42,7 +42,7 @@ in vec2 uv7;
 #define IN_uv7 uv7
 
 uniform sampler2D occludeMap ;
-uniform sampler2D prepassMap ;
+uniform sampler2D deferredMap ;
 uniform float blurDepthTol;
 uniform float blurNormalTol;
 
@@ -51,7 +51,7 @@ out vec4 OUT_col;
 void _sample( vec2 uv, float weight, vec4 centerTap, inout int usedCount, inout float occlusion, inout float total )
 {
    //return;
-   vec4 tap = prepassUncondition( prepassMap, uv );   
+   vec4 tap = deferredUncondition( deferredMap, uv );   
    
    if ( abs( tap.a - centerTap.a ) < blurDepthTol )
    {
@@ -67,7 +67,7 @@ void _sample( vec2 uv, float weight, vec4 centerTap, inout int usedCount, inout
 void main()
 {   
    //vec4 centerTap;
-   vec4 centerTap = prepassUncondition( prepassMap, IN_uv0.zw );
+   vec4 centerTap = deferredUncondition( deferredMap, IN_uv0.zw );
    
    //return centerTap;
    

+ 6 - 6
Templates/Full/game/shaders/common/postFx/ssao/gl/SSAO_P.glsl

@@ -27,7 +27,7 @@
 #define DOSMALL
 #define DOLARGE
 
-uniform sampler2D prepassMap ;
+uniform sampler2D deferredMap ;
 uniform sampler2D randNormalTex ;
 uniform sampler1D powTable ;
 
@@ -146,9 +146,9 @@ void main()
    vec3 reflectNormal = normalize( tex2Dlod( randNormalTex, noiseMapUV ).xyz * 2.0 - 1.0 );   
    //return vec4( reflectNormal, 1 );
    
-   vec4 prepass = prepassUncondition( prepassMap, IN_uv0 );
-   vec3 normal = prepass.xyz;
-   float depth = prepass.a;
+   vec4 deferred = deferredUncondition( deferredMap, IN_uv0 );
+   vec3 normal = deferred.xyz;
+   float depth = deferred.a;
    //return vec4( ( depth ).xxx, 1 );
       
    // Early out if too far away.
@@ -203,7 +203,7 @@ void main()
        
       se = ep + ray;
             
-      occluderFragment = prepassUncondition( prepassMap, se.xy );                  
+      occluderFragment = deferredUncondition( deferredMap, se.xy );                  
       
       depthDiff = se.z - occluderFragment.a; 
       
@@ -252,7 +252,7 @@ void main()
        
       se = ep + ray;
             
-      occluderFragment = prepassUncondition( prepassMap, se.xy );                  
+      occluderFragment = deferredUncondition( deferredMap, se.xy );                  
       
       depthDiff = se.z - occluderFragment.a;       
       

+ 3 - 3
Templates/Full/game/shaders/common/postFx/underwaterFogP.hlsl

@@ -37,7 +37,7 @@
 // Uniforms                                                                  
 //-----------------------------------------------------------------------------
 
-TORQUE_UNIFORM_SAMPLER2D(prepassTex, 0);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex, 0);
 TORQUE_UNIFORM_SAMPLER2D(backbuffer, 1);
 TORQUE_UNIFORM_SAMPLER1D(waterDepthGradMap, 2);
 
@@ -53,9 +53,9 @@ uniform float4    rtParams0;
 
 float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
 {    
-   //float2 prepassCoord = IN.uv0;
+   //float2 deferredCoord = IN.uv0;
    //IN.uv0 = ( IN.uv0.xy * rtParams0.zw ) + rtParams0.xy;
-   float depth = TORQUE_PREPASS_UNCONDITION( prepassTex, IN.uv0 ).w;
+   float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w;
    //return float4( depth.rrr, 1 );
    
    // Skip fogging the extreme far plane so that 

+ 2 - 2
Templates/Full/game/shaders/common/shaderModelAutoGen.hlsl

@@ -27,9 +27,9 @@
 
 // Portability helpers for autogenConditioners
 #if (TORQUE_SM >= 10 && TORQUE_SM <=30)
-   #define TORQUE_PREPASS_UNCONDITION(tex, coords) prepassUncondition(tex, coords)
+   #define TORQUE_PREPASS_UNCONDITION(tex, coords) deferredUncondition(tex, coords)
 #elif TORQUE_SM >= 40
-   #define TORQUE_PREPASS_UNCONDITION(tex, coords) prepassUncondition(tex, texture_##tex, coords)
+   #define TORQUE_PREPASS_UNCONDITION(tex, coords) deferredUncondition(tex, texture_##tex, coords)
 #endif
 
 #endif //_TORQUE_SHADERMODEL_AUTOGEN_

+ 1 - 1
Templates/Full/game/shaders/common/water/gl/waterBasicP.glsl

@@ -94,7 +94,7 @@ float fresnel(float NdotV, float bias, float power)
 // Uniforms                                                                  
 //-----------------------------------------------------------------------------
 uniform sampler2D      bumpMap;
-//uniform sampler2D    prepassTex;
+//uniform sampler2D    deferredTex;
 uniform sampler2D    reflectMap;
 uniform sampler2D      refractBuff;
 uniform samplerCube  skyMap;

+ 16 - 16
Templates/Full/game/shaders/common/water/gl/waterP.glsl

@@ -116,7 +116,7 @@ float fresnel(float NdotV, float bias, float power)
 // Uniforms                                                                  
 //-----------------------------------------------------------------------------
 uniform sampler2D      bumpMap;
-uniform sampler2D    prepassTex;
+uniform sampler2D    deferredTex;
 uniform sampler2D    reflectMap;
 uniform sampler2D      refractBuff;
 uniform samplerCube  skyMap;
@@ -165,9 +165,9 @@ void main()
    // Convert from WorldSpace to EyeSpace.
    float pixelDepth = PIXEL_DIST / farPlaneDist; 
    
-   vec2 prepassCoord = viewportCoordToRenderTarget( IN_posPostWave, rtParams1 );
+   vec2 deferredCoord = viewportCoordToRenderTarget( IN_posPostWave, rtParams1 );
 
-   float startDepth = prepassUncondition( prepassTex, prepassCoord ).w;  
+   float startDepth = deferredUncondition( deferredTex, deferredCoord ).w;  
    
    // The water depth in world units of the undistorted pixel.
    float startDelta = ( startDepth - pixelDepth );
@@ -189,14 +189,14 @@ void main()
    vec4 distortPos = IN_posPostWave;
    distortPos.xy += distortDelta;      
       
-   prepassCoord = viewportCoordToRenderTarget( distortPos, rtParams1 );   
+   deferredCoord = viewportCoordToRenderTarget( distortPos, rtParams1 );   
 
-   // Get prepass depth at the position of this distorted pixel.
-   float prepassDepth = prepassUncondition( prepassTex, prepassCoord ).w;      
-   if ( prepassDepth > 0.99 )
-     prepassDepth = 5.0;
+   // Get deferred depth at the position of this distorted pixel.
+   float deferredDepth = deferredUncondition( deferredTex, deferredCoord ).w;      
+   if ( deferredDepth > 0.99 )
+     deferredDepth = 5.0;
     
-   float delta = ( prepassDepth - pixelDepth ) * farPlaneDist;
+   float delta = ( deferredDepth - pixelDepth ) * farPlaneDist;
       
    if ( delta < 0.0 )
    {
@@ -209,7 +209,7 @@ void main()
    } 
    else
    {
-      float diff = ( prepassDepth - startDepth ) * farPlaneDist;
+      float diff = ( deferredDepth - startDepth ) * farPlaneDist;
    
       if ( diff < 0 )
       {
@@ -221,13 +221,13 @@ void main()
          distortPos = IN_posPostWave;         
          distortPos.xy += distortDelta;    
         
-         prepassCoord = viewportCoordToRenderTarget( distortPos, rtParams1 );
+         deferredCoord = viewportCoordToRenderTarget( distortPos, rtParams1 );
 
-         // Get prepass depth at the position of this distorted pixel.
-         prepassDepth = prepassUncondition( prepassTex, prepassCoord ).w;
-	 if ( prepassDepth > 0.99 )
-            prepassDepth = 5.0;
-         delta = ( prepassDepth - pixelDepth ) * farPlaneDist;
+         // Get deferred depth at the position of this distorted pixel.
+         deferredDepth = deferredUncondition( deferredTex, deferredCoord ).w;
+	 if ( deferredDepth > 0.99 )
+            deferredDepth = 5.0;
+         delta = ( deferredDepth - pixelDepth ) * farPlaneDist;
       }
        
       if ( delta < 0.1 )

+ 1 - 1
Templates/Full/game/shaders/common/water/waterBasicP.hlsl

@@ -93,7 +93,7 @@ float fresnel(float NdotV, float bias, float power)
 // Uniforms                                                                  
 //-----------------------------------------------------------------------------
 TORQUE_UNIFORM_SAMPLER2D(bumpMap,0);
-//uniform sampler2D    prepassTex  : register( S1 );
+//uniform sampler2D    deferredTex  : register( S1 );
 TORQUE_UNIFORM_SAMPLER2D(reflectMap,2);
 TORQUE_UNIFORM_SAMPLER2D(refractBuff,3);
 TORQUE_UNIFORM_SAMPLERCUBE(skyMap,4);

+ 16 - 16
Templates/Full/game/shaders/common/water/waterP.hlsl

@@ -106,7 +106,7 @@ float fresnel(float NdotV, float bias, float power)
 // Uniforms                                                                  
 //-----------------------------------------------------------------------------
 TORQUE_UNIFORM_SAMPLER2D(bumpMap,0);
-TORQUE_UNIFORM_SAMPLER2D(prepassTex, 1);
+TORQUE_UNIFORM_SAMPLER2D(deferredTex, 1);
 TORQUE_UNIFORM_SAMPLER2D(reflectMap, 2);
 TORQUE_UNIFORM_SAMPLER2D(refractBuff, 3);
 TORQUE_UNIFORM_SAMPLERCUBE(skyMap, 4);
@@ -153,9 +153,9 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0
    // Convert from WorldSpace to EyeSpace.
    float pixelDepth = PIXEL_DIST / farPlaneDist; 
    
-   float2 prepassCoord = viewportCoordToRenderTarget( IN.posPostWave, rtParams1 );
+   float2 deferredCoord = viewportCoordToRenderTarget( IN.posPostWave, rtParams1 );
 
-   float startDepth = TORQUE_PREPASS_UNCONDITION( prepassTex, prepassCoord ).w;  
+   float startDepth = TORQUE_PREPASS_UNCONDITION( deferredTex, deferredCoord ).w;  
    
    // The water depth in world units of the undistorted pixel.
    float startDelta = ( startDepth - pixelDepth );
@@ -177,14 +177,14 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0
    float4 distortPos = IN.posPostWave;
    distortPos.xy += distortDelta;      
       
-   prepassCoord = viewportCoordToRenderTarget( distortPos, rtParams1 );   
+   deferredCoord = viewportCoordToRenderTarget( distortPos, rtParams1 );   
 
-   // Get prepass depth at the position of this distorted pixel.
-   float prepassDepth = TORQUE_PREPASS_UNCONDITION( prepassTex, prepassCoord ).w;      
-   if ( prepassDepth > 0.99 )
-     prepassDepth = 5.0;
+   // Get deferred depth at the position of this distorted pixel.
+   float deferredDepth = TORQUE_PREPASS_UNCONDITION( deferredTex, deferredCoord ).w;      
+   if ( deferredDepth > 0.99 )
+     deferredDepth = 5.0;
     
-   float delta = ( prepassDepth - pixelDepth ) * farPlaneDist;
+   float delta = ( deferredDepth - pixelDepth ) * farPlaneDist;
       
    if ( delta < 0.0 )
    {
@@ -197,7 +197,7 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0
    } 
    else
    {
-      float diff = ( prepassDepth - startDepth ) * farPlaneDist;
+      float diff = ( deferredDepth - startDepth ) * farPlaneDist;
    
       if ( diff < 0 )
       {
@@ -209,13 +209,13 @@ float4 main( ConnectData IN ) : TORQUE_TARGET0
          distortPos = IN.posPostWave;         
          distortPos.xy += distortDelta;    
         
-         prepassCoord = viewportCoordToRenderTarget( distortPos, rtParams1 );
+         deferredCoord = viewportCoordToRenderTarget( distortPos, rtParams1 );
 
-         // Get prepass depth at the position of this distorted pixel.
-         prepassDepth = TORQUE_PREPASS_UNCONDITION( prepassTex, prepassCoord ).w;
-	 if ( prepassDepth > 0.99 )
-            prepassDepth = 5.0;
-         delta = ( prepassDepth - pixelDepth ) * farPlaneDist;
+         // Get deferred depth at the position of this distorted pixel.
+         deferredDepth = TORQUE_PREPASS_UNCONDITION( deferredTex, deferredCoord ).w;
+	 if ( deferredDepth > 0.99 )
+            deferredDepth = 5.0;
+         delta = ( deferredDepth - pixelDepth ) * farPlaneDist;
       }
        
       if ( delta < 0.1 )