diff options
author | Jaime van Kessel <nallath@gmail.com> | 2022-01-03 17:32:58 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2022-01-03 17:32:58 +0300 |
commit | f11d728c6ba8fb31837145ab808d99b738deddd1 (patch) | |
tree | acc07493639344a135816a0b46a0f3bbb76178df /plugins/SimulationView | |
parent | cefffe62cd617b419e77dd6e3a6f2bfb94516540 (diff) | |
parent | 58c9522d78fa2279b689b7f38314c5c978f47272 (diff) |
Merge branch 'master' of github.com:Ultimaker/Cura into replace_controls_1_for_controls_2
Diffstat (limited to 'plugins/SimulationView')
-rw-r--r-- | plugins/SimulationView/SimulationPass.py | 2 | ||||
-rw-r--r-- | plugins/SimulationView/layers3d.shader | 12 | ||||
-rw-r--r-- | plugins/SimulationView/plugin.json | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/SimulationView/SimulationPass.py b/plugins/SimulationView/SimulationPass.py index 2754fb5d94..1294b37db4 100644 --- a/plugins/SimulationView/SimulationPass.py +++ b/plugins/SimulationView/SimulationPass.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Ultimaker B.V. +# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from UM.Math.Color import Color diff --git a/plugins/SimulationView/layers3d.shader b/plugins/SimulationView/layers3d.shader index f9d67f284c..b43d998690 100644 --- a/plugins/SimulationView/layers3d.shader +++ b/plugins/SimulationView/layers3d.shader @@ -56,12 +56,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); } @@ -76,7 +76,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) { @@ -98,18 +98,18 @@ 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); } float clamp(float v) { - float t = v < 0 ? 0 : v; + float t = v < 0.0 ? 0.0 : v; return t > 1.0 ? 1.0 : t; } diff --git a/plugins/SimulationView/plugin.json b/plugins/SimulationView/plugin.json index 5ea5e20596..39c528f89d 100644 --- a/plugins/SimulationView/plugin.json +++ b/plugins/SimulationView/plugin.json @@ -2,7 +2,7 @@ "name": "Simulation View", "author": "Ultimaker B.V.", "version": "1.0.1", - "description": "Provides the Simulation view.", + "description": "Provides the preview of sliced layerdata.", "api": 7, "i18n-catalog": "cura" } |