浏览代码

Update depth_render.fs

pull/5200/head
Ray 2 周前
父节点
当前提交
e7cfd3d4a3
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. +4
    -3
      examples/shaders/resources/shaders/glsl100/depth_render.fs

+ 4
- 3
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);
}
}

正在加载...
取消
保存