Browse Source

Merge pull request #476 from Azaezel/alpha40/emissiveProper

reset emissive to show 0,0,0,0 for local/vector lights in a manner th…
Brian Roberts 4 years ago
parent
commit
5442f52bc5

+ 1 - 1
Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/pointLightP.glsl

@@ -154,7 +154,7 @@ void main()
    //early out if emissive
    //early out if emissive
    if (getFlag(surface.matFlag, 0))
    if (getFlag(surface.matFlag, 0))
    {
    {
-      OUT_col = vec4(surface.albedo, 0);
+      OUT_col = vec4(0, 0, 0, 0);
       return;
       return;
    }
    }
 
 

+ 1 - 1
Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/gl/spotLightP.glsl

@@ -86,7 +86,7 @@ void main()
    //early out if emissive
    //early out if emissive
    if (getFlag(surface.matFlag, 0))
    if (getFlag(surface.matFlag, 0))
    {
    {
-      OUT_col = vec4(surface.albedo, 0);
+      OUT_col = vec4(0, 0, 0, 0);
       return;
       return;
    }
    }
    
    

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

@@ -189,7 +189,7 @@ void main()
    //early out if emissive
    //early out if emissive
    if (getFlag(surface.matFlag, 0))
    if (getFlag(surface.matFlag, 0))
    {
    {
-      OUT_col = vec4(surface.albedo, 0);
+      OUT_col = vec4(0, 0, 0, 0);
       return;
       return;
 	}
 	}
 	
 	

+ 1 - 1
Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/pointLightP.hlsl

@@ -157,7 +157,7 @@ float4 main(   ConvexConnectP IN ) : SV_TARGET
    //early out if emissive
    //early out if emissive
    if (getFlag(surface.matFlag, 0))
    if (getFlag(surface.matFlag, 0))
    {   
    {   
-        return float4(surface.albedo, 0);
+      return float4(0, 0, 0, 0);
    }
    }
 
 
    float3 L = lightPosition - surface.P;
    float3 L = lightPosition - surface.P;

+ 1 - 1
Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/spotLightP.hlsl

@@ -92,7 +92,7 @@ float4 main(   ConvexConnectP IN ) : SV_TARGET
    //early out if emissive
    //early out if emissive
    if (getFlag(surface.matFlag, 0))
    if (getFlag(surface.matFlag, 0))
    {
    {
-      return float4(surface.albedo, 0);
+      return float4(0, 0, 0, 0);
 	}
 	}
 
 
    float3 L = lightPosition - surface.P;
    float3 L = lightPosition - surface.P;

+ 1 - 1
Templates/BaseGame/game/core/rendering/shaders/lighting/advanced/vectorLightP.hlsl

@@ -180,7 +180,7 @@ float4 main(FarFrustumQuadConnectP IN) : SV_TARGET
    //early out if emissive
    //early out if emissive
    if (getFlag(surface.matFlag, 0))
    if (getFlag(surface.matFlag, 0))
    {   
    {   
-      return float4(surface.albedo, 0);
+      return float4(0, 0, 0, 0);
 	}
 	}
    
    
    //create surface to light                           
    //create surface to light