cultmath_weighted_lattice_cells: the ring exit takes (float)(k - 1), GLSL ES has no int-to-float promotion

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-17 16:23:43 +02:00
commit a88df479b8
2 changed files with 2 additions and 2 deletions

View file

@ -772,7 +772,7 @@ float4 cultmath_weighted_lattice_cells(float2 p, float time, float4 bodies[CULTM
int reach = 0;
for (int k = 0; k <= 37; k++)
{
if (k > 1 && 0.5 * (k - 1) >= max(f2, f1 + 2.0 * smoothing))
if (k > 1 && 0.5 * (float)(k - 1) >= max(f2, f1 + 2.0 * smoothing))
break;
for (int dz = -k; dz <= k; dz++)
{

View file

@ -772,7 +772,7 @@ float4 cultmath_weighted_lattice_cells(float2 p, float time, float4 bodies[CULTM
int reach = 0;
for (int k = 0; k <= 37; k++)
{
if (k > 1 && 0.5 * (k - 1) >= max(f2, f1 + 2.0 * smoothing))
if (k > 1 && 0.5 * (float)(k - 1) >= max(f2, f1 + 2.0 * smoothing))
break;
for (int dz = -k; dz <= k; dz++)
{