1
0
mirror of https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git synced 2025-08-23 12:45:29 +08:00
This commit is contained in:
Meow J
2017-02-25 04:40:29 +08:00
parent ade2dcdd86
commit 75e877f2c1

View File

@@ -165,7 +165,7 @@ float LinearizeDepth(float depth)
void main() void main()
{ {
float depth = LinearizeDepth(gl_FragCoord.z); float depth = LinearizeDepth(gl_FragCoord.z) / far; // 为了演示除以far
color = vec4(vec3(depth), 1.0f); color = vec4(vec3(depth), 1.0f);
} }
``` ```