LumixEngine/data/pipelines/particles.shd
2018-10-13 00:09:50 +02:00

22 lines
No EOL
438 B
Text

------------------
vertex_shader [[
uniform mat4 u_model;
layout(location = 0) in vec3 i_position;
void main() {
vec2 pos = vec2(gl_VertexID & 1, (gl_VertexID & 2) * 0.5) * 0.05;
gl_Position = u_camera_projection * u_camera_view * u_model * vec4(i_position.xy + pos, i_position.z, 1);
}
]]
---------------------
fragment_shader [[
layout(location = 0) out vec4 o_color;
void main() {
o_color = vec4(1, 0, 0, 1);
}
]]