Browse Source

Actually show 'on buildplate' color when z=0.

CURA-7871
Remco Burema 4 years ago
parent
commit
538ccf5e21
1 changed files with 2 additions and 2 deletions
  1. 2 2
      resources/shaders/overhang.shader

+ 2 - 2
resources/shaders/overhang.shader

@@ -62,7 +62,7 @@ fragment =
         highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0);
         finalColor += pow(NdotR, u_shininess) * u_specularColor;
 
-        finalColor = (f_vertex.y > 0.0001 && -normal.y > u_overhangAngle) ? u_overhangColor : finalColor;
+        finalColor = (f_vertex.y >= 0.0 && -normal.y > u_overhangAngle) ? u_overhangColor : finalColor;
 
         highp vec3 grid = vec3(f_vertex.x - floor(f_vertex.x - 0.5), f_vertex.y - floor(f_vertex.y - 0.5), f_vertex.z - floor(f_vertex.z - 0.5));
         finalColor.a = (u_renderError > 0.5) && dot(grid, grid) < 0.245 ? 0.667 : 1.0;
@@ -140,7 +140,7 @@ fragment41core =
         highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0);
         finalColor += pow(NdotR, u_shininess) * u_specularColor;
 
-        finalColor = (u_faceId != gl_PrimitiveID) ? ((f_vertex.y > 0.0001 && -normal.y > u_overhangAngle) ? u_overhangColor : finalColor) : u_faceColor;
+        finalColor = (u_faceId != gl_PrimitiveID) ? ((f_vertex.y >= 0.0 && -normal.y > u_overhangAngle) ? u_overhangColor : finalColor) : u_faceColor;
 
         frag_color = finalColor;
         if (f_vertex.y <= u_lowestPrintableHeight)