diff --git a/data/levels/scripts/openSecondDoor1.lua b/data/levels/scripts/openSecondDoor1.lua index 85f1958..e7bd2d3 100644 --- a/data/levels/scripts/openSecondDoor1.lua +++ b/data/levels/scripts/openSecondDoor1.lua @@ -29,7 +29,7 @@ function trigger(objectToChange) local yPos = 25.0 local zPos = 54.5 level:preloadLightPosition(xPos, yPos, zPos) - level:addLightByParameters(0.2, 0.9, 0.0, 4.0, -2.5, 1.3, 2.3) + level:addLightByParameters(0.2, 0.9, 0.0, 4.0, -2.0, 1.3, 2.0) print("openSecondDoor1") end end diff --git a/data/levels/scripts/openSecondDoor2.lua b/data/levels/scripts/openSecondDoor2.lua index b680df7..c7c0407 100644 --- a/data/levels/scripts/openSecondDoor2.lua +++ b/data/levels/scripts/openSecondDoor2.lua @@ -29,7 +29,7 @@ function trigger(objectToChange) local yPos = 25.0 local zPos = 26.5 level:preloadLightPosition(xPos, yPos, zPos) - level:addLightByParameters(0.2, 0.9, 0.0, 4.0, -2.5, 1.3, 2.3) + level:addLightByParameters(0.2, 0.9, 0.0, 4.0, -2.0, 1.3, 2.0) print("openSecondDoor2") end end diff --git a/data/levels/scripts/openSecondDoor3.lua b/data/levels/scripts/openSecondDoor3.lua index 9a5faf5..845d578 100644 --- a/data/levels/scripts/openSecondDoor3.lua +++ b/data/levels/scripts/openSecondDoor3.lua @@ -29,7 +29,7 @@ function trigger(objectToChange) local yPos = 25.0 local zPos = 26.5 level:preloadLightPosition(xPos, yPos, zPos) - level:addLightByParameters(0.2, 0.9, 0.0, 4.0, -2.5, 1.3, 2.3) + level:addLightByParameters(0.2, 0.9, 0.0, 4.0, -2.0, 1.3, 2.0) print("openSecondDoor3") end end diff --git a/data/levels/scripts/openSecondDoor4.lua b/data/levels/scripts/openSecondDoor4.lua index fe9ed6c..1b6c287 100644 --- a/data/levels/scripts/openSecondDoor4.lua +++ b/data/levels/scripts/openSecondDoor4.lua @@ -38,7 +38,7 @@ function trigger(objectToChange) local yPos = 25.0 local zPos = 54.5 level:preloadLightPosition(xPos, yPos, zPos) - level:addLightByParameters(0.2, 0.9, 0.0, 4.0, -2.5, 1.3, 2.3) + level:addLightByParameters(0.2, 0.9, 0.0, 4.0, -2.0, 1.3, 2.0) print("openSecondDoor4") end end diff --git a/data/shader/phong.fsh b/data/shader/phong.fsh index 7562e38..fe25761 100644 --- a/data/shader/phong.fsh +++ b/data/shader/phong.fsh @@ -132,8 +132,8 @@ float samplePointShadow(samplerCubeShadow shadowMap, vec3 lightDirection) { float A = -(farPlane+nearPlane)/(farPlane-nearPlane); float B = -2*(farPlane*nearPlane)/(farPlane - nearPlane); float compValue = 0.5*(-A*length(lightDirection) + B)/length(lightDirection) + 0.5; - float bias = 0.001*tan(acos(clamp(dot(vNormal, -directionalLightVector), 0.0, 1.0))); - bias = clamp(bias, 0.0, 0.01); + float bias = 0.001*tan(acos(clamp(dot(vNormal, lightDirection), 0.0, 1.0))); + bias = clamp(bias, 0.0, 0.001); return texture(shadowMap, vec4(lightDirection , compValue - bias)); }