Changed on what sun angle shadows get rendered.

This commit is contained in:
Faerbit 2015-03-09 22:31:45 +01:00
parent cbb65848d9
commit 1b3fa3eed3
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -348,7 +348,7 @@ void Graphics::render(double time)
for (unsigned int i = 0; i<framebuffer_directional.size(); i++) {
framebuffer_directional.at(i)->bind();
glClear(GL_DEPTH_BUFFER_BIT);
if (sunAngle > -0.7f) {
if (sunAngle > -0.6f) {
float projection_size = 0.0f;
switch(i) {
case 0: