polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

commit 7ef262708b3fb06e5d9721ce174120b427abf6d7
parent 4517d8d4e6b18b3add5d5f642969151a2647153d
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 25 Oct 2018 14:18:09 -0700

vertex-color shader: normalize light dir

should probably do this in code instead...

Diffstat:
Metc/shaders/vertex-color.glsl | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/shaders/vertex-color.glsl b/etc/shaders/vertex-color.glsl @@ -25,7 +25,7 @@ void main() vec4 trans_normal = normal_matrix * v4_normal; vec4 v4_pos = vec4(position, 1.0); gl_Position = mvp * v4_pos; - v_light = dot(trans_normal.xyz, light_dir); + v_light = dot(trans_normal.xyz, normalize(light_dir)); v_color = color;