16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 13:59:19 +02:00

fix gtao glitches; add timer to measure animation phase

This commit is contained in:
Wls50
2025-11-24 21:22:19 +01:00
committed by Hirek
parent 0820873a45
commit a22f449ecd
11 changed files with 71 additions and 21 deletions

View File

@@ -111,11 +111,10 @@ float3 XeGTAO_ComputeViewspacePosition( const float2 screenPos, const float view
float XeGTAO_ScreenSpaceToViewSpaceDepth( const float screenDepth, const GTAOConstants consts )
{
float depthLinearizeMul = consts.DepthUnpackConsts.x;
float depthLinearizeAdd = consts.DepthUnpackConsts.y;
// Optimised version of "-cameraClipNear / (cameraClipFar - projDepth * (cameraClipFar - cameraClipNear)) * cameraClipFar"
//return 2500. / (.1 - screenDepth * (.1 - 2500.)) * .1;
return depthLinearizeMul / (depthLinearizeAdd - screenDepth);
float depthLinearizeMul = consts.DepthUnpackConsts.x;
float depthLinearizeAdd = consts.DepthUnpackConsts.y;
// Optimised version of "-cameraClipNear / (cameraClipFar - projDepth * (cameraClipFar - cameraClipNear)) * cameraClipFar"
return depthLinearizeMul / (depthLinearizeAdd - screenDepth);
}
lpfloat4 XeGTAO_CalculateEdges( const lpfloat centerZ, const lpfloat leftZ, const lpfloat rightZ, const lpfloat topZ, const lpfloat bottomZ )