From 66eb59e36ba9160fabb847c30496e4911eaf6087 Mon Sep 17 00:00:00 2001 From: daid303 Date: Wed, 3 Apr 2013 16:09:06 +0200 Subject: [PATCH] Fix shader code (caused exception on mac) --- Cura/gui/sceneView.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cura/gui/sceneView.py b/Cura/gui/sceneView.py index fbe94816..9bcc6d21 100644 --- a/Cura/gui/sceneView.py +++ b/Cura/gui/sceneView.py @@ -362,8 +362,8 @@ varying float light_amount; void main(void) { vec4 tmp = gl_Vertex; - tmp.x += sin(tmp.z/5+intensity*30) * scale * intensity; - tmp.y += sin(tmp.z/3+intensity*40) * scale * intensity; + tmp.x += sin(tmp.z/5.0+intensity*30.0) * scale * intensity; + tmp.y += sin(tmp.z/3.0+intensity*40.0) * scale * intensity; gl_Position = gl_ModelViewProjectionMatrix * tmp; gl_FrontColor = gl_Color; @@ -378,7 +378,7 @@ varying float light_amount; void main(void) { - gl_FragColor = vec4(gl_Color.xyz * light_amount, 1-intensity); + gl_FragColor = vec4(gl_Color.xyz * light_amount, 1.0-intensity); } """) self._init3DView() -- 2.30.2