From 25b7cea64ca6366343b95087a5aedca9964d55cc Mon Sep 17 00:00:00 2001 From: Timo de Kort Date: Sun, 15 Nov 2020 23:12:59 +0100 Subject: [PATCH] [rs] Remove implicit conversion hello-triangle shader.vert --- wgpu/examples/hello-triangle/shader.vert | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wgpu/examples/hello-triangle/shader.vert b/wgpu/examples/hello-triangle/shader.vert index 2b9399e710..9e1e39c1bd 100644 --- a/wgpu/examples/hello-triangle/shader.vert +++ b/wgpu/examples/hello-triangle/shader.vert @@ -5,6 +5,7 @@ out gl_PerVertex { }; void main() { - vec2 position = vec2(gl_VertexIndex, (gl_VertexIndex & 1) * 2) - 1; - gl_Position = vec4(position, 0.0, 1.0); + float x = float(gl_VertexIndex - 1); + float y = float(((gl_VertexIndex & 1) * 2) - 1); + gl_Position = vec4(x, y, 0.0, 1.0); }