Merge branch 'master' of github.com:Faerbit/swp

This commit is contained in:
Steffen Fündgens 2015-03-09 16:54:33 +01:00
commit f1e87f4cb9
5 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -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));
}