Bladeren bron

Removed unused pixel shader uniforms.

Lasse Öörni 14 jaren geleden
bovenliggende
commit
19a40e561b

+ 0 - 3
Engine/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -2389,13 +2389,10 @@ void Graphics::InitializeShaderParameters()
     shaderParameters_["SkinMatrices"] = VSP_SKINMATRICES;
     
     shaderParameters_["AmbientColor"] = PSP_AMBIENTCOLOR;
-    shaderParameters_["CameraPosPS"] = PSP_CAMERAPOS;
     shaderParameters_["EdgeFilterParams"] = PSP_EDGEFILTERPARAMS;
     shaderParameters_["ElapsedTimePS"] = PSP_ELAPSEDTIME;
     shaderParameters_["FogColor"] = PSP_FOGCOLOR;
     shaderParameters_["FogParams"] = PSP_FOGPARAMS;
-    shaderParameters_["GBufferOffsetsPS"] = PSP_GBUFFEROFFSETS;
-    shaderParameters_["GBufferViewport"] = PSP_GBUFFERVIEWPORT;
     shaderParameters_["LightAtten"] = PSP_LIGHTATTEN;
     shaderParameters_["LightColor"] = PSP_LIGHTCOLOR;
     shaderParameters_["LightDir"] = PSP_LIGHTDIR;

+ 0 - 3
Engine/Graphics/GraphicsDefs.h

@@ -218,14 +218,11 @@ enum ShaderParameter
     VSP_VIEWUPVECTOR,
     VSP_SKINMATRICES,
     PSP_AMBIENTCOLOR,
-    PSP_CAMERAPOS,
     PSP_DEPTHRECONSTRUCT,
     PSP_EDGEFILTERPARAMS,
     PSP_ELAPSEDTIME,
     PSP_FOGCOLOR,
     PSP_FOGPARAMS,
-    PSP_GBUFFEROFFSETS,
-    PSP_GBUFFERVIEWPORT,
     PSP_LIGHTATTEN,
     PSP_LIGHTCOLOR,
     PSP_LIGHTDIR,

+ 1 - 1
Engine/Graphics/OcclusionBuffer.cpp

@@ -94,7 +94,7 @@ bool OcclusionBuffer::SetSize(int width, int height)
             break;
     }
     
-    LOGINFO("Set occlusion buffer size " + String(width_) + "x" + String(height_) + " with " + 
+    LOGDEBUG("Set occlusion buffer size " + String(width_) + "x" + String(height_) + " with " + 
         String(mipBuffers_.Size()) + " mip levels");
     
     CalculateViewport();

+ 0 - 3
Engine/Graphics/OpenGL/OGLGraphics.cpp

@@ -2458,14 +2458,11 @@ void Graphics::InitializeShaderParameters()
     shaderParameters_["SkinMatrices"] = VSP_SKINMATRICES;
     
     shaderParameters_["AmbientColor"] = PSP_AMBIENTCOLOR;
-    shaderParameters_["CameraPosPS"] = PSP_CAMERAPOS;
     shaderParameters_["DepthReconstruct"] = PSP_DEPTHRECONSTRUCT;
     shaderParameters_["EdgeFilterParams"] = PSP_EDGEFILTERPARAMS;
     shaderParameters_["ElapsedTimePS"] = PSP_ELAPSEDTIME;
     shaderParameters_["FogColor"] = PSP_FOGCOLOR;
     shaderParameters_["FogParams"] = PSP_FOGPARAMS;
-    shaderParameters_["GBufferOffsetsPS"] = PSP_GBUFFEROFFSETS;
-    shaderParameters_["GBufferViewport"] = PSP_GBUFFERVIEWPORT;
     shaderParameters_["LightAtten"] = PSP_LIGHTATTEN;
     shaderParameters_["LightColor"] = PSP_LIGHTCOLOR;
     shaderParameters_["LightDir"] = PSP_LIGHTDIR;

+ 1 - 1
Engine/Graphics/Renderer.cpp

@@ -266,7 +266,7 @@ Renderer::Renderer(Context* context) :
     shadowMapHiresDepth_(false),
     reuseShadowMaps_(true),
     dynamicInstancing_(true),
-    edgeFilter_(EdgeFilterParameters(0.4f, 0.5f, 0.8f)),
+    edgeFilter_(EdgeFilterParameters(0.4f, 0.5f, 0.9f)),
     maxOccluderTriangles_(5000),
     occlusionBufferSize_(256),
     occluderSizeThreshold_(0.1f),

+ 0 - 2
Engine/Graphics/View.cpp

@@ -819,8 +819,6 @@ void View::RenderBatchesDeferred()
     
     shaderParameters_[VSP_FRUSTUMSIZE] = viewportParams;
     shaderParameters_[VSP_GBUFFEROFFSETS] = bufferUVOffset;
-    shaderParameters_[PSP_GBUFFEROFFSETS] = bufferUVOffset;
-    shaderParameters_[PSP_GBUFFERVIEWPORT] = viewportSize;
     
     {
         // Clear and render the G-buffer

+ 0 - 3
SourceAssets/GLSLShaders/Uniforms.frag

@@ -1,12 +1,9 @@
 uniform vec3 cAmbientColor;
-uniform vec3 cCameraPosPS;
 uniform vec2 cDepthReconstruct;
 uniform vec3 cEdgeFilterParams;
 uniform vec2 cElapsedTimePS;
 uniform vec4 cFogParams;
 uniform vec3 cFogColor;
-uniform vec4 cGBufferOffsetsPS;
-uniform vec4 cGBufferViewport;
 uniform float cLightAtten;
 uniform vec4 cLightColor;
 uniform vec3 cLightDir;

+ 17 - 20
SourceAssets/HLSLShaders/Uniforms.hlsl

@@ -17,23 +17,20 @@ uniform float4x3 cSkinMatrices[64] : register(C27);
 
 // Pixel shader parameters
 uniform float3 cAmbientColor : register(C0);
-uniform float3 cCameraPosPS : register(C1);
-uniform float4 cEdgeFilterParams : register(C2);
-uniform float2 cElapsedTimePS : register(C3);
-uniform float4 cFogParams : register(C4);
-uniform float3 cFogColor : register(C5);
-uniform float4 cGBufferOffsetsPS : register(C6);
-uniform float4 cGBufferViewport : register(C7);
-uniform float cLightAtten : register(C8);
-uniform float4 cLightColor : register(C9);
-uniform float3 cLightDir : register(C10);
-uniform float3 cLightPos : register(C11);
-uniform float4 cLightSplits : register(C12);
-uniform float3x3 cLightVecRot: register(C13);
-uniform float4 cMatDiffColor : register(C16);
-uniform float3 cMatEmissiveColor : register(C17);
-uniform float2 cMatSpecProperties : register(C18);
-uniform float4 cSampleOffsets : register(C19);
-uniform float2 cShadowIntensity : register(C20);
-uniform float4x4 cShadowProjPS : register(C21);
-uniform float4x4 cSpotProjPS : register(C25);
+uniform float4 cEdgeFilterParams : register(C1);
+uniform float2 cElapsedTimePS : register(C2);
+uniform float4 cFogParams : register(C3);
+uniform float3 cFogColor : register(C4);
+uniform float cLightAtten : register(C5);
+uniform float4 cLightColor : register(C6);
+uniform float3 cLightDir : register(C7);
+uniform float3 cLightPos : register(C8);
+uniform float4 cLightSplits : register(C9);
+uniform float3x3 cLightVecRot: register(C10);
+uniform float4 cMatDiffColor : register(C13);
+uniform float3 cMatEmissiveColor : register(C14);
+uniform float2 cMatSpecProperties : register(C15);
+uniform float4 cSampleOffsets : register(C16);
+uniform float2 cShadowIntensity : register(C17);
+uniform float4x4 cShadowProjPS : register(C18);
+uniform float4x4 cSpotProjPS : register(C22);