mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +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 )
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
templates:
|
||||
# Partially pre-filled containers to avoid excessive copypasta
|
||||
XeGTAO:
|
||||
# TODO Depth conversion is broken since converting to reversed depth buffer
|
||||
# after attempting to fix it, it is still broken but with hardcoded values
|
||||
source: XeGTAO/GTAO
|
||||
target: compute
|
||||
definitions: # TODO (mostly) move to shader file I guess
|
||||
@@ -14,6 +12,7 @@ templates:
|
||||
XE_GTAO_USE_HALF_FLOAT_PRECISION: 0
|
||||
VA_COMPILED_AS_SHADER_CODE: 1
|
||||
VA_SATURATE: saturate
|
||||
XE_GTAO_GENERATE_NORMALS_INPLACE: 1
|
||||
envmap:
|
||||
source: envmap
|
||||
target: compute
|
||||
|
||||
Reference in New Issue
Block a user