mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 22:10:36 +00:00
puts a form of ssao back. as this is intended to replicate shadows, bolted that to the shadow portion of the calc. as it was previously addative, did so in an addative manner.
This commit is contained in:
parent
6248b427bf
commit
fa41ea3e16
1 changed files with 6 additions and 1 deletions
|
|
@ -234,9 +234,14 @@ float4 main(FarFrustumQuadConnectP IN) : SV_TARGET
|
|||
#endif
|
||||
|
||||
#endif //NO_SHADOW
|
||||
float3 ao = float3(1,1,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);
|
||||
float3 lighting = getDirectionalLight(surface, surfaceToLight, lightingColor.rgb, lightBrightness, shadow+ao);
|
||||
|
||||
return float4(lighting, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue