Fix depth map

texture2D is deprecated since GLSL 1.30 and removed in 3.30 and beyond.
This commit is contained in:
Matthias Kuhn 2025-06-16 14:48:21 +02:00
parent 6c9250f95c
commit 246d00230c

View File

@ -9,7 +9,7 @@ out vec4 fragColor;
void main()
{
float z = texture2D( depthTexture, texCoord ).r;
float z = texture( depthTexture, texCoord ).r;
fragColor.b = float( int(z * 255) ) / 255.0;
z = z * 255.0 - fragColor.b * 255.0;
fragColor.g = float( int(z * 255) ) / 255.0;