mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 20:59:19 +02:00
fix gtao glitches; add timer to measure animation phase
This commit is contained in:
@@ -54,6 +54,7 @@ SamplerState g_samplerPointClamp : register( s0 );
|
||||
// Engine-specific normal map loader
|
||||
lpfloat3 LoadNormal( int2 pos )
|
||||
{
|
||||
return (float3)0.;
|
||||
#if 0
|
||||
// special decoding for external normals stored in 11_11_10 unorm - modify appropriately to support your own encoding
|
||||
uint packedInput = g_srcNormalmap.Load( int3(pos, 0) ).x;
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user