polyadvent

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

commit 6d5dbefefda4080105ed86f7f6e172c2bb580dac
parent 3520a325b301e2871413479035e6afe47f9453de
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 31 Oct 2018 13:27:41 -0700

fix ambient

Diffstat:
Metc/shaders/lighting.glsl | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/etc/shaders/lighting.glsl b/etc/shaders/lighting.glsl @@ -23,7 +23,10 @@ vec3 standard_light(vec3 color, vec3 position) { const float pi = 3.14159265; const float shiny = 6.0; float ambient_str = 0.2; - float spec_str = 0.8 * light_intensity; + float spec_str = 0.6 * light_intensity; + + // too much ambient during daytime is making things look weird + ambient_str =- light_intensity * ambient_str; vec3 ray = camera_position - position; vec3 view_dir = normalize(ray);