Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Kuipers <t.kuipers@ultimaker.com>2019-10-22 12:27:30 +0300
committerTim Kuipers <t.kuipers@ultimaker.com>2020-02-27 18:41:20 +0300
commit4a8385e3e8b91e0a6443b104b4d6a6320648314f (patch)
tree1be38414a51ee6a104eed5bbf528c9de57ce2ca3 /plugins/XRayView
parentb515a0f74468983b7c66178fda54b6abe7277983 (diff)
make xray counting color hardcoded value
Somewhere between the xray.shader and the xray_composite.shader the colors are stored as unsigned int. Since we want to count the integer number of faces behind a pixel in the red channel, we simply use a color with an r value of 1/255.
Diffstat (limited to 'plugins/XRayView')
-rw-r--r--plugins/XRayView/xray_composite.shader4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/XRayView/xray_composite.shader b/plugins/XRayView/xray_composite.shader
index 8bb0f83e9b..8e21bf00c8 100644
--- a/plugins/XRayView/xray_composite.shader
+++ b/plugins/XRayView/xray_composite.shader
@@ -50,7 +50,7 @@ fragment =
result = layer0 * layer0.a + result * (1.0 - layer0.a);
- float intersection_count = (texture2D(u_layer2, v_uvs).r * 255.0) / 5.0;
+ float intersection_count = texture2D(u_layer2, v_uvs).r * 255.0;
if(mod(intersection_count, 2.0) >= 1.0)
{
result = u_error_color;
@@ -121,7 +121,7 @@ fragment41core =
result = layer0 * layer0.a + result * (1.0 - layer0.a);
- float intersection_count = (texture(u_layer2, v_uvs).r * 255.0) / 5.0;
+ float intersection_count = texture(u_layer2, v_uvs).r * 255.0;
if(mod(intersection_count, 2.0) >= 1.0)
{
result = u_error_color;