Fix heightmap shadow rt and draw the light pos
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user