simplification

This commit is contained in:
Azaezel 2018-11-29 18:19:27 -06:00
parent fcef7061c8
commit a2bd0e0fcd

View file

@ -234,14 +234,12 @@ float4 main(FarFrustumQuadConnectP IN) : SV_TARGET
#endif
#endif //NO_SHADOW
float ao = 1;
// Sample the AO texture.
#ifdef USE_SSAO_MASK
ao = 1.0 - TORQUE_TEX2D( ssaoMask, viewportCoordToRenderTarget( IN.uv0.xy, rtParams3 ) ).r;
surface.ao *= 1.0 - TORQUE_TEX2D( ssaoMask, viewportCoordToRenderTarget( IN.uv0.xy, rtParams3 ) ).r;
#endif
//get directional light contribution
surface.ao *= ao;
float3 lighting = getDirectionalLight(surface, surfaceToLight, lightingColor.rgb, lightBrightness, shadow);
return float4(lighting, 0);