Skip to content

Commit b0fc478

Browse files
authored
fix gradient sprite generation color mismatch (#132)
1 parent 89d57ad commit b0fc478

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Runtime/Types/Gradient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ internal GradientRampProperties GetRamp(Vector2 dimensions, int resolution = 102
183183
var t = i * resRp;
184184
var rt = length * t + offset;
185185

186-
var px = GetColorForOffset(distance, rt);
186+
// Convert to linear space as the texture is marked as linear
187+
var px = GetColorForOffset(distance, rt).linear;
187188

188189
// This is done so that transparent pixels have same color channel as next pixel
189190
// So that the bilinear interpolation shows a better texture

0 commit comments

Comments
 (0)