mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 14:55:03 -06: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue