Remove implicit casts and comparisons of int to float

We can't change this index to an integer, because varying variables can't be integer, even though this variable will only really be tested on vertex level. Not sure if varying was the right choice, but I don't want to change that.
This prevents a crash, probably only occurring on certain GPUs.

Contributes to issue CURA-8657.
This commit is contained in:
Ghostkeeper 2021-11-15 15:19:57 +01:00
parent 51c5572f0f
commit dc28370178
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
4 changed files with 8 additions and 8 deletions

View file

@ -112,7 +112,7 @@ geometry41core =
float size_x;
float size_y;
if (u_drawRange[0] >= 0 && u_drawRange[1] >= 0 && (v_index[0] < u_drawRange[0] || v_index[0] >= u_drawRange[1]))
if (u_drawRange[0] >= 0.0 && u_drawRange[1] >= 0.0 && (v_index[0] < u_drawRange[0] || v_index[0] >= u_drawRange[1]))
{
return;
}
@ -278,7 +278,7 @@ u_show_helpers = 1
u_show_skin = 1
u_show_infill = 1
u_drawRange = [-1, -1]
u_drawRange = [-1.0, -1.0]
[bindings]
u_modelMatrix = model_matrix