1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

ColourGradient: Create lookup tables using non-premultiplied colours

The OpenGL renderer uses ColourGradient::createLookupTable to generate
gradient textures. However, the tweening method used was different to
the tweening used by CoreGraphics gradients, and by the software
renderer.

Gradient tweening is now computed using non-premultiplied colours, to
ensure consistency between gradients rendered using OpenGL, and with
other renderers.
This commit is contained in:
reuk 2023-02-07 13:58:49 +00:00
parent 9cfbccca8e
commit a59cba010b
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
6 changed files with 61 additions and 17 deletions

View file

@ -1139,7 +1139,7 @@ struct StateHelpers
JUCE_CHECK_OPENGL_ERROR;
PixelARGB lookup[gradientTextureSize];
gradient.createLookupTable (lookup, gradientTextureSize);
gradient.createLookupTable (lookup);
gradientTextures.getUnchecked (activeGradientIndex)->loadARGB (lookup, gradientTextureSize, 1);
}