Stop dividing by zero
This commit is contained in:
parent
9a06d92ed7
commit
bd2307f782
5 changed files with 20 additions and 10 deletions
|
|
@ -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
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue