mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-14 12:13:46 +00:00
in keeping with a more integrated setup, used multiplicative ao for darkening existing composite map ao contributions.
This commit is contained in:
parent
98cf1c9aa3
commit
3ce1fc66bc
1 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue