mirror of
https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git
synced 2025-08-23 12:45:29 +08:00
04-01
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user