account for attenuation

This commit is contained in:
Azaezel 2018-11-02 16:28:50 -05:00
parent ed7ace451c
commit 69a2dae3bb
2 changed files with 4 additions and 4 deletions

View file

@ -246,8 +246,8 @@ LightTargetOutput main( ConvexConnectP IN )
LightResult result = GetDirectionalLight(surface, surfaceToLight, lightColor.rgb, lightBrightness, shadowed); LightResult result = GetDirectionalLight(surface, surfaceToLight, lightColor.rgb, lightBrightness, shadowed);
//output //output
Output.diffuse = float4(result.diffuse, 0); Output.diffuse = float4(result.diffuse*atten, 0);
Output.spec = float4(result.spec, 0); Output.spec = float4(result.spec*atten, 0);
return Output; return Output;
} }

View file

@ -175,8 +175,8 @@ LightTargetOutput main( ConvexConnectP IN )
LightResult result = GetDirectionalLight(surface, surfaceToLight, lightColor.rgb, lightBrightness, shadowed); LightResult result = GetDirectionalLight(surface, surfaceToLight, lightColor.rgb, lightBrightness, shadowed);
//output //output
Output.diffuse = float4(result.diffuse, 0); Output.diffuse = float4(result.diffuse*atten, 0);
Output.spec = float4(result.spec, 0); Output.spec = float4(result.spec*atten, 0);
return Output; return Output;
} }