kaliber/assets/sky.glsl_vertex

22 lines
415 B
Plaintext
Raw Permalink Normal View History

2020-12-24 23:22:41 +00:00
IN(0) vec2 in_position;
IN(1) vec2 in_tex_coord_0;
2020-04-13 11:24:53 +00:00
2020-12-24 23:22:41 +00:00
UNIFORM_BEGIN
UNIFORM_V(vec2 scale)
UNIFORM_V(mat4 projection)
UNIFORM_F(vec2 sky_offset)
UNIFORM_F(vec3 nebula_color)
UNIFORM_END
2020-04-13 11:24:53 +00:00
2020-12-24 23:22:41 +00:00
OUT(0) vec2 tex_coord_0;
2020-04-13 11:24:53 +00:00
void main() {
// Simple 2d transform.
vec2 position = in_position;
2020-12-24 23:22:41 +00:00
position *= PARAM(scale);
2020-04-13 11:24:53 +00:00
tex_coord_0 = in_tex_coord_0;
2020-12-24 23:22:41 +00:00
gl_Position = PARAM(projection) * vec4(position, 0.0, 1.0);
2020-04-13 11:24:53 +00:00
}