From dc69fab1565659241eb6f2f3576076872e86c45e Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 16 Dec 2018 23:46:32 +0100 Subject: Filter weird origin vertex The same thing occurs in computicle. I suspect some initialization / compute shader invokation problem. On the other hand: Why would that happen for the origin vertex and not e.g. the first or last vertex in memory? To be investigated further. --- src/shader/code/geometry.glsl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/shader/code/geometry.glsl') diff --git a/src/shader/code/geometry.glsl b/src/shader/code/geometry.glsl index 6701b41..6ecfc99 100644 --- a/src/shader/code/geometry.glsl +++ b/src/shader/code/geometry.glsl @@ -30,8 +30,10 @@ void emitSquareAt(vec4 position) { } void main() { - color = gs_in[0].color; - emitSquareAt(gl_in[0].gl_Position); - EndPrimitive(); + if ( gl_in[0].gl_Position.xyz != vec3(0.,0.,0.) ) { + color = gs_in[0].color; + emitSquareAt(gl_in[0].gl_Position); + EndPrimitive(); + } } )"; -- cgit v1.2.3