From e7cfd3d4a304b724193edb8df3ed13407c802c1d Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 21 Sep 2025 13:28:27 +0200 Subject: [PATCH] Update depth_render.fs --- examples/shaders/resources/shaders/glsl100/depth_render.fs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/shaders/resources/shaders/glsl100/depth_render.fs b/examples/shaders/resources/shaders/glsl100/depth_render.fs index b330bd9c6..362c1fb37 100644 --- a/examples/shaders/resources/shaders/glsl100/depth_render.fs +++ b/examples/shaders/resources/shaders/glsl100/depth_render.fs @@ -1,5 +1,7 @@ #version 100 +precision mediump float; + // Input vertex attributes (from vertex shader) varying vec2 fragTexCoord; @@ -14,8 +16,7 @@ void main() { // Handle potential Y-flipping vec2 texCoord = fragTexCoord; - if (flipY) - texCoord.y = 1.0 - texCoord.y; + if (flipY) texCoord.y = 1.0 - texCoord.y; // Sample depth texture float depth = texture2D(depthTexture, texCoord).r; @@ -25,4 +26,4 @@ void main() // Output final color gl_FragColor = vec4(vec3(linearDepth), 1.0); -} \ No newline at end of file +}