From 3ce1fc66bc17c415932932c05ab454d36319c01a Mon Sep 17 00:00:00 2001 From: Azaezel Date: Thu, 29 Nov 2018 17:47:07 -0600 Subject: [PATCH] in keeping with a more integrated setup, used multiplicative ao for darkening existing composite map ao contributions. --- .../game/shaders/common/lighting/advanced/vectorLightP.hlsl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Templates/Full/game/shaders/common/lighting/advanced/vectorLightP.hlsl b/Templates/Full/game/shaders/common/lighting/advanced/vectorLightP.hlsl index 8ebe65e6a..6a3ac09a9 100644 --- a/Templates/Full/game/shaders/common/lighting/advanced/vectorLightP.hlsl +++ b/Templates/Full/game/shaders/common/lighting/advanced/vectorLightP.hlsl @@ -234,14 +234,15 @@ float4 main(FarFrustumQuadConnectP IN) : SV_TARGET #endif #endif //NO_SHADOW - float3 ao = float3(1,1,1); + float ao = 1; // Sample the AO texture. #ifdef USE_SSAO_MASK ao = 1.0 - TORQUE_TEX2D( ssaoMask, viewportCoordToRenderTarget( IN.uv0.xy, rtParams3 ) ).r; #endif //get directional light contribution - float3 lighting = getDirectionalLight(surface, surfaceToLight, lightingColor.rgb, lightBrightness, shadow+ao); + surface.ao *= ao; + float3 lighting = getDirectionalLight(surface, surfaceToLight, lightingColor.rgb, lightBrightness, shadow); return float4(lighting, 0); }