Adds a skydome with two scrolling layers of procedurally generated clouds to create an interestingish environment.
18 lines
367 B
GLSL
18 lines
367 B
GLSL
#version 330 core
|
|
layout (location = 0) in vec3 aPos;
|
|
|
|
out vec3 WorldPos;
|
|
|
|
uniform mat4 view;
|
|
uniform mat4 projection;
|
|
|
|
void main() {
|
|
WorldPos = aPos;
|
|
|
|
/* Force depth value to 1.0 after perspective division
|
|
* to ensure the skybox is always rendered behind everythig else.
|
|
*/
|
|
vec4 pos = projection * view * vec4(WorldPos, 1.0);
|
|
gl_Position = pos.xyww;
|
|
}
|