Fixed y value of the sun.
This commit is contained in:
parent
1399f6ad7a
commit
39a0883466
@ -14,7 +14,7 @@ uniform vec3 cameraCenter;
|
|||||||
uniform vec3 sunColor;
|
uniform vec3 sunColor;
|
||||||
uniform vec3 directionalVector;
|
uniform vec3 directionalVector;
|
||||||
|
|
||||||
const float sunSize = 40.0;
|
const float sunSize = 20.0;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec4 textureColor = vec4(0.0, 0.0, 0.0, 1.0);
|
vec4 textureColor = vec4(0.0, 0.0, 0.0, 1.0);
|
||||||
|
@ -17,6 +17,6 @@ out vec4 sunPosition;
|
|||||||
void main() {
|
void main() {
|
||||||
fragPosition = modelMatrix * vec4(aPosition, 1.0);
|
fragPosition = modelMatrix * vec4(aPosition, 1.0);
|
||||||
vTexCoord = aTexCoord;
|
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);
|
gl_Position = modelViewProjectionMatrix * vec4(aPosition, 1.0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user