mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 13:49:39 +08:00
parent
72d31d2ae5
commit
8dbbe2bd3a
@ -65,6 +65,10 @@ fragment =
|
||||
|
||||
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;
|
||||
if (f_vertex.y < 0.0)
|
||||
{
|
||||
finalColor.rgb = vec3(1.0, 1.0, 1.0) - finalColor.rgb;
|
||||
}
|
||||
|
||||
gl_FragColor = finalColor;
|
||||
}
|
||||
@ -137,6 +141,10 @@ fragment41core =
|
||||
finalColor = (u_faceId != gl_PrimitiveID) ? ((-normal.y > u_overhangAngle) ? u_overhangColor : finalColor) : u_faceColor;
|
||||
|
||||
frag_color = finalColor;
|
||||
if (f_vertex.y < 0.0)
|
||||
{
|
||||
frag_color.rgb = vec3(1.0, 1.0, 1.0) - frag_color.rgb;
|
||||
}
|
||||
vec3 grid = f_vertex - round(f_vertex);
|
||||
frag_color.a = (u_renderError > 0.5) && dot(grid, grid) < 0.245 ? 0.667 : 1.0;
|
||||
}
|
||||
|
@ -64,6 +64,10 @@ fragment =
|
||||
highp vec3 viewVector = normalize(u_viewPosition - v_vertex);
|
||||
highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0);
|
||||
finalColor += pow(NdotR, u_shininess) * u_specularColor;
|
||||
if (v_vertex.y < 0.0)
|
||||
{
|
||||
finalColor.rgb = vec3(1.0, 1.0, 1.0) - finalColor.rgb;
|
||||
}
|
||||
|
||||
gl_FragColor = finalColor;
|
||||
gl_FragColor.a = u_opacity;
|
||||
@ -140,6 +144,10 @@ fragment41core =
|
||||
finalColor += pow(NdotR, u_shininess) * u_specularColor;
|
||||
|
||||
frag_color = finalColor;
|
||||
if (v_vertex.y < 0.0)
|
||||
{
|
||||
frag_color.rgb = vec3(1.0, 1.0, 1.0) - frag_color.rgb;
|
||||
}
|
||||
frag_color.a = u_opacity;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user