1
0
mirror of https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git synced 2025-08-23 12:45:29 +08:00

fix typo in advanced lightning/05 parallax mapping

This commit is contained in:
Fu Zhen
2018-02-21 18:22:46 +08:00
committed by GitHub
parent 1ca912c2ef
commit 7a80e13ea0

View File

@@ -143,7 +143,7 @@ void main()
vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir) vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir)
{ {
float height = texture(depthMap, texCoords).r; float height = texture(depthMap, texCoords).r;
vec3 p = viewDir.xy / viewDir.z * (height * height_scale); vec2 p = viewDir.xy / viewDir.z * (height * height_scale);
return texCoords - p; return texCoords - p;
} }
``` ```