mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:45:52 +08:00
Round doesn't work for OpenGL 2.1 because it was only added in glsl 130.
So mad at myself right now >:-( Part of the further fallout of CURA-7147
This commit is contained in:
parent
888937d03b
commit
7ed59503d6
@ -70,7 +70,7 @@ fragment =
|
||||
|
||||
if(u_renderError > 0.5)
|
||||
{
|
||||
vec3 grid = vec3(f_vertex.x - round(f_vertex.x), f_vertex.y - round(f_vertex.y), f_vertex.z - round(f_vertex.z));
|
||||
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 = dot(grid, grid) < 0.245 ? 0.667 : 1.0;
|
||||
}
|
||||
gl_FragColor = finalColor;
|
||||
|
Loading…
x
Reference in New Issue
Block a user