Fixed the conical gradient. (flutter/engine#40371)

Fixed the conical gradient.
This commit is contained in:
gaaclarke
2023-03-16 18:33:37 -07:00
committed by GitHub
parent 584f49dcad
commit f3202c36cc

View File

@@ -17,7 +17,7 @@ float IPComputeConicalT(vec2 c0, float r0, vec2 c1, float r1, vec2 p) {
vec2 ab = c1 - c0;
float dr = r1 - r0;
// Set sample rate to a minimum for the case where c0 and c1 are close.
float delta = max(1.0 / length(ab), 100.0);
float delta = 1.0 / max(length(ab), 100.0);
while (w >= 0.0) {
vec2 cw = w * ab + c0;
float rw = w * dr + r0;