Stop dividing by zero

This commit is contained in:
Andras Schmelczer 2026-06-10 21:36:13 +01:00
parent 9a06d92ed7
commit bd2307f782
5 changed files with 20 additions and 10 deletions

View file

@ -41,7 +41,7 @@ export const DropletFactory = (color: vec3 | vec4 | number): typeof DropletBase
float h = clamp(
dot(targetFromDelta, toFromDeltas[i])
/ dot(toFromDeltas[i], toFromDeltas[i]),
/ max(dot(toFromDeltas[i], toFromDeltas[i]), 0.00000001),
0.0, 1.0
);