medfall

A super great game engine
Log | Files | Refs

commit 279fa02ea2533e86e732d7e960e4a83f1133c76d
parent 3e52f9f14df5714229040f6a7ddcbd1df32e162b
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Jul  8 23:18:11 +0300

Oops

Diffstat:
shaders/terrain.glsl | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/shaders/terrain.glsl b/shaders/terrain.glsl @@ -68,9 +68,8 @@ void main() { // sunlight + sky ambient lighting // area of a chord is somewhat similar to smoothstep - vec3 sun_dir2 = vec3( 0, 0, 1 ); float sun_visible_fraction = smoothstep( -0.2, 0.2, sun_angle - horizon_angle ); - float sunlight_lambert = max( 0, dot( normal, sun_dir2 ) ); + float sunlight_lambert = max( 0, dot( normal, sun_dir ) ); vec3 sunlight = sun_visible_fraction * sunlight_lambert * vec3( 0.9, 0.9, 0.5 ); vec3 ambient = vec3( 0.05, 0.05, 0.15 );