~shockham/meshi

76ff02da7929174ee77886cfb116bf96ed33907c — shockham 3 years ago 9df3a66
Add the geometry primitive shape offset to the geometry shader output
1 files changed, 2 insertions(+), 0 deletions(-)

M src/shaders/geom.glsl
M src/shaders/geom.glsl => src/shaders/geom.glsl +2 -0
@@ 15,11 15,13 @@ in vec2 te_texture[];
out vec3 g_normal;
out vec3 g_pos;
out vec2 g_texture;
out vec2 g_diff;

void emit (int i, vec4 diff) {
    g_normal = te_normal[i];
    g_pos = te_pos[i] + diff.xyz;
    g_texture = te_texture[i];
    g_diff = diff.xy;
    gl_Position = gl_in[i].gl_Position + diff;
    EmitVertex();
}