diff --git a/docs/04 Advanced OpenGL/01 Depth testing.md b/docs/04 Advanced OpenGL/01 Depth testing.md index 2f11437..062121f 100644 --- a/docs/04 Advanced OpenGL/01 Depth testing.md +++ b/docs/04 Advanced OpenGL/01 Depth testing.md @@ -165,7 +165,7 @@ float LinearizeDepth(float depth) void main() { - float depth = LinearizeDepth(gl_FragCoord.z); + float depth = LinearizeDepth(gl_FragCoord.z) / far; // 为了演示除以far color = vec4(vec3(depth), 1.0f); } ```