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

Merge pull request #93 from fuzhenn/patch-1

fix typo in advanced lightning/05 parallax mapping
This commit is contained in:
Meow J
2018-02-21 19:40:25 -05:00
committed by GitHub

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;
} }
``` ```