From 1b3fa3eed30a3d830bc0f800ee3a218e824b0b80 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Mon, 9 Mar 2015 22:31:45 +0100 Subject: [PATCH] Changed on what sun angle shadows get rendered. --- data/shader/phong.fsh | 2 +- graphics.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/shader/phong.fsh b/data/shader/phong.fsh index fe25761..f069c03 100644 --- a/data/shader/phong.fsh +++ b/data/shader/phong.fsh @@ -155,7 +155,7 @@ void main() if(length(directionalLightVector)>0.0f) { vec3 directionalVector = normalize(directionalLightVector); sunAngle = dot(vec3(0.0, 1.0, 0.0), directionalVector); - if ( sunAngle > -0.7) { + if ( sunAngle > -0.6) { float directionalVisibility = 1.0f; if (distanceToBorder(shadowCoord1.xy) <= 0.5 && distanceToBorder(shadowCoord1.xy) > 0.2) { if (distanceToBorder(shadowCoord0.xy) <= 0.5 && distanceToBorder(shadowCoord0.xy) > 0.2) { diff --git a/graphics.cc b/graphics.cc index f860c90..15c9d1f 100644 --- a/graphics.cc +++ b/graphics.cc @@ -348,7 +348,7 @@ void Graphics::render(double time) for (unsigned int i = 0; ibind(); glClear(GL_DEPTH_BUFFER_BIT); - if (sunAngle > -0.7f) { + if (sunAngle > -0.6f) { float projection_size = 0.0f; switch(i) { case 0: