Fix heightmap shadow rt and draw the light pos

This commit is contained in:
2019-01-10 22:21:44 +01:00
parent 9787175b13
commit 6ba29926ef
7 changed files with 40 additions and 22 deletions

View File

@@ -548,7 +548,7 @@ void App::initShaders()
"in mediump vec2 uv;\n"
"out mediump vec4 frag;\n"
"void main() {\n"
" mediump float d = max(0.0, dot(normalize(n), light_dir));\n"
" mediump float d = max(0.0, dot(normalize(n), normalize(light_dir)));\n"
" mediump vec4 c = texture(tex, uv);\n"
" frag = vec4(c.rgb * d, 1.0);\n"
"}\n";