mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Don't show overhang on first layer or below buildplate.
This commit is contained in:
parent
d7325be39f
commit
3717181884
1 changed files with 2 additions and 2 deletions
|
|
@ -61,7 +61,7 @@ fragment =
|
||||||
highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0);
|
highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0);
|
||||||
finalColor += pow(NdotR, u_shininess) * u_specularColor;
|
finalColor += pow(NdotR, u_shininess) * u_specularColor;
|
||||||
|
|
||||||
finalColor = (-normal.y > u_overhangAngle) ? u_overhangColor : finalColor;
|
finalColor = (f_vertex.y > 0.0001 && -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));
|
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;
|
finalColor.a = (u_renderError > 0.5) && dot(grid, grid) < 0.245 ? 0.667 : 1.0;
|
||||||
|
|
@ -138,7 +138,7 @@ fragment41core =
|
||||||
highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0);
|
highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0);
|
||||||
finalColor += pow(NdotR, u_shininess) * u_specularColor;
|
finalColor += pow(NdotR, u_shininess) * u_specularColor;
|
||||||
|
|
||||||
finalColor = (u_faceId != gl_PrimitiveID) ? ((-normal.y > u_overhangAngle) ? u_overhangColor : finalColor) : u_faceColor;
|
finalColor = (u_faceId != gl_PrimitiveID) ? ((f_vertex.y > 0.0001 && -normal.y > u_overhangAngle) ? u_overhangColor : finalColor) : u_faceColor;
|
||||||
|
|
||||||
frag_color = finalColor;
|
frag_color = finalColor;
|
||||||
if (f_vertex.y <= 0.0)
|
if (f_vertex.y <= 0.0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue