Bläddra i källkod

Merge pull request #814 from Azaezel/alpha40/vectorlightvisfix

fix vectorlight visualizer varnames
Brian Roberts 3 år sedan
förälder
incheckning
9836f6eb30

+ 6 - 6
Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp

@@ -140,19 +140,19 @@ void DebugVizHLSL::processPix(Vector<ShaderComponent*>& componentList,
       Var* skylightCubemapIdx = (Var*)LangElement::find("inSkylightCubemapIdx");
       Var* inProbePosArray = (Var*)LangElement::find("inProbePosArray");
       Var* inRefPosArray = (Var*)LangElement::find("inRefPosArray");
-      Var* refScaleArray = (Var*)LangElement::find("inRefScale");
+      Var* refScaleArray = (Var*)LangElement::find("inRefScaleArray");
 
-      Var* probeConfigData = (Var*)LangElement::find("inProbeConfigData");
+      Var* probeConfigData = (Var*)LangElement::find("inProbeConfigDataArray");
       Var* worldToObjArray = (Var*)LangElement::find("inWorldToObjArray");
 
       Var* BRDFTexture = (Var*)LangElement::find("BRDFTexture");
       Var* BRDFTextureTex = (Var*)LangElement::find("texture_BRDFTexture");
 
-      Var* specularCubemapAR = (Var*)LangElement::find("inSpecularCubemapAR");
-      Var* specularCubemapARTex = (Var*)LangElement::find("texture_inSpecularCubemapAR");
+      Var* specularCubemapAR = (Var*)LangElement::find("SpecularCubemapAR");
+      Var* specularCubemapARTex = (Var*)LangElement::find("texture_SpecularCubemapAR");
 
-      Var* irradianceCubemapAR = (Var*)LangElement::find("inIrradianceCubemapAR");
-      Var* irradianceCubemapARTex = (Var*)LangElement::find("texture_inIrradianceCubemapAR");
+      Var* irradianceCubemapAR = (Var*)LangElement::find("IrradianceCubemapAR");
+      Var* irradianceCubemapARTex = (Var*)LangElement::find("texture_IrradianceCubemapAR");
 
       Var* matinfo = (Var*)LangElement::find("ORMConfig");
       Var* metalness = (Var*)LangElement::find("metalness");

+ 4 - 4
Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/vectorLightP.glsl

@@ -220,7 +220,7 @@ void main()
       
       #ifdef PSSM_DEBUG_RENDER
          if ( fadeOutAmt > 1.0 )
-            lightingColor = 1.0;
+            lightingColor = vec3(1.0,1.0,1.0);
       #endif
 
    #endif //NO_SHADOW
@@ -229,7 +229,7 @@ void main()
       vec3 factor = lightingColor.rgb * max(surfaceToLight.NdotL, 0) * shadow * lightBrightness;
       vec3 diffuse = BRDF_GetDebugDiffuse(surface,surfaceToLight) * factor;
 
-      vec3 final = max(0.0f, diffuse);
+      vec3 final = max(vec3(0.0f,0.0f,0.0f), diffuse);
       
       OUT_col = vec4(final, 0);
       return;
@@ -239,7 +239,7 @@ void main()
       vec3 factor = lightingColor.rgb * max(surfaceToLight.NdotL, 0) * shadow * lightBrightness;
       vec3 spec = BRDF_GetDebugSpecular(surface, surfaceToLight) * factor;
 
-      vec3 final = max(0.0f, factor);
+      vec3 final = max(vec3(0.0f,0.0f,0.0f), factor);
       
       OUT_col = vec4(final, 0);
       return;
@@ -250,7 +250,7 @@ void main()
       vec3 diffuse = BRDF_GetDebugDiffuse(surface,surfaceToLight) * factor;
       vec3 spec = BRDF_GetDebugSpecular(surface,surfaceToLight) * factor;
 
-      vec3 final = max(0.0f, diffuse + spec);
+      vec3 final = max(vec3(0.0f,0.0f,0.0f), diffuse + spec);
       
       OUT_col = vec4(final, 0);
       return;