Object Occlusion Culling

This commit is contained in:
2026-10-15 02:41:03 -07:00
parent 3273054766
commit 612a3d0a09
33 changed files with 3629 additions and 84 deletions

View File

@ -81,11 +81,11 @@ void main() {
vec4 gr = textureLod(gbuffer_refraction, texCoord, 0.0);
float ior = unpackIOR(gr.x);
float transmittance = gr.y;
float surfaceDepth = gr.z;
float surfaceDepth = textureLod(gbufferD, texCoord, 0.0).r;
float d = surfaceDepth * 2.0 - 1.0;
vec4 sceneSample = textureLod(tex, texCoord, 0.0);
if (surfaceDepth == 0.0 || surfaceDepth == 1.0) {
if (gr.z == 0.0 || surfaceDepth == 1.0) {
fragColor = sceneSample;
return;
}