Merge pull request #62297 from m-kuhn/glsl_330

Fix depth map for GLSL compatibility
This commit is contained in:
Matthias Kuhn 2025-06-17 06:37:55 +02:00 committed by GitHub
commit 3b1627a8fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;