Fixed y value of the sun.

This commit is contained in:
Jasper 2015-03-06 16:14:59 +01:00
parent 1399f6ad7a
commit 39a0883466
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ uniform vec3 cameraCenter;
uniform vec3 sunColor;
uniform vec3 directionalVector;
const float sunSize = 40.0;
const float sunSize = 20.0;
void main() {
vec4 textureColor = vec4(0.0, 0.0, 0.0, 1.0);

View File

@ -17,6 +17,6 @@ out vec4 sunPosition;
void main() {
fragPosition = modelMatrix * vec4(aPosition, 1.0);
vTexCoord = aTexCoord;
sunPosition = (normalize(vec4(directionalVector, 0.0)) * skydomeSize) + vec4(cameraCenter, 1.0);
sunPosition = (normalize(vec4(directionalVector, 0.0)) * skydomeSize) + vec4(cameraCenter.x, 0, cameraCenter.z, 1.0);
gl_Position = modelViewProjectionMatrix * vec4(aPosition, 1.0);
}