Really fixing culling for real this time

This commit is contained in:
Dynamitos
2024-08-31 16:30:57 +02:00
parent d7aefc07f3
commit e247fe4edb
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -85,7 +85,10 @@ float4 clipToScreen(float4 clip)
{
float4 ndc = clip / clip.w;
float2 texCoords = (float2(ndc.xy) + 1.0f) / 2.0f;
return float4(float2(texCoords.x, 1 - texCoords.y) * pViewParams.screenDimensions, 1 - ndc.z, 1.0f);
float oz = 1;
float pz = 0 - 1;
float zf = pz * ndc.z + oz;
return float4(float2(texCoords.x, 1 - texCoords.y) * pViewParams.screenDimensions, zf, 1.0f);
}
struct Plane