From ac8d5fc12cd48a8c79430a312931394c5ef3cd3c Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 23 Nov 2021 09:27:25 +0100 Subject: [PATCH] More explicit float's in shader just to be sure. CURA-8714 --- plugins/SimulationView/layers3d.shader | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/SimulationView/layers3d.shader b/plugins/SimulationView/layers3d.shader index a3be25cf01..a079fd887b 100644 --- a/plugins/SimulationView/layers3d.shader +++ b/plugins/SimulationView/layers3d.shader @@ -58,12 +58,12 @@ vertex41core = value = (abs_value - min_value) / (max_value - min_value); } float red = value; - float green = 1-abs(1-4*value); + float green = 1.0 - abs(1.0 - 4.0 * value); if (value > 0.375) { green = 0.5; } - float blue = max(1-4*value, 0); + float blue = max(1.0 - 4.0 * value, 0.0); return vec4(red, green, blue, 1.0); } @@ -78,7 +78,7 @@ vertex41core = { value = (abs_value - min_value) / (max_value - min_value); } - float red = min(max(4*value-2, 0), 1); + float red = min(max(4.0 * value - 2.0, 0.0), 1.0); float green = min(1.5*value, 0.75); if (value > 0.75) { @@ -100,12 +100,12 @@ vertex41core = value = (abs_value - min_value) / (max_value - min_value); } float red = value; - float green = 1 - abs(1 - 4 * value); + float green = 1.0 - abs(1.0 - 4.0 * value); if(value > 0.375) { green = 0.5; } - float blue = max(1 - 4 * value, 0); + float blue = max(1.0 - 4.0 * value, 0.0); return vec4(red, green, blue, 1.0); }