opengl-playground/imgui-submodule/imgui/examples/shaders/triangle-gen-zoomed-geometry.glsl

18 lines
398 B
Plaintext
Raw Normal View History

2020-03-21 22:38:10 +01:00
#version 330 core
layout (points) in;
layout (triangle_strip, max_vertices=3) out;
uniform float zoom;
void main()
{
gl_Position = gl_in[0].gl_Position + vec4(-0.1, 0.0, 0.0, 0.0) * zoom;
EmitVertex();
gl_Position = gl_in[0].gl_Position + vec4(0.0, 0.1, 0.0, 0.0) * zoom;
EmitVertex();
gl_Position = gl_in[0].gl_Position + vec4(0.1, 0.0, 0.0, 0.0) * zoom;
EmitVertex();
EndPrimitive();
}