diff --git a/android/core/src/processing/opengl/LineVert.glsl b/android/core/src/processing/opengl/LineVert.glsl index 6769dc8d8..52f334b28 100644 --- a/android/core/src/processing/opengl/LineVert.glsl +++ b/android/core/src/processing/opengl/LineVert.glsl @@ -56,7 +56,7 @@ void main() { float thickness = direction.w; if (thickness != 0.0) { - vec4 posq = posp + modelview * vec4(direction.xyz, 1); + vec4 posq = posp + modelview * vec4(direction.xyz, 0); posq.xyz = posq.xyz * scale; vec4 clipq = projection * posq; @@ -76,10 +76,10 @@ void main() { // No perspective correction. vec4 offsetp = windowToClipVector(offset, viewport, clipp.w); gl_Position = clipp + offsetp; - } + } } else { gl_Position = clipp; } vertColor = color; -} \ No newline at end of file +} diff --git a/core/src/processing/opengl/LineVert.glsl b/core/src/processing/opengl/LineVert.glsl index 6769dc8d8..52f334b28 100644 --- a/core/src/processing/opengl/LineVert.glsl +++ b/core/src/processing/opengl/LineVert.glsl @@ -56,7 +56,7 @@ void main() { float thickness = direction.w; if (thickness != 0.0) { - vec4 posq = posp + modelview * vec4(direction.xyz, 1); + vec4 posq = posp + modelview * vec4(direction.xyz, 0); posq.xyz = posq.xyz * scale; vec4 clipq = projection * posq; @@ -76,10 +76,10 @@ void main() { // No perspective correction. vec4 offsetp = windowToClipVector(offset, viewport, clipp.w); gl_Position = clipp + offsetp; - } + } } else { gl_Position = clipp; } vertColor = color; -} \ No newline at end of file +}