bettola/assets/shaders/sky.vert
Ritchie Cunningham a1c214caec [Add] Procedural cloud rendering.
Adds a skydome with two scrolling layers of procedurally generated
clouds to create an interestingish environment.
2025-09-18 20:18:02 +01:00

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