qskinny icon indicating copy to clipboard operation
qskinny copied to clipboard

simplified shaders for gradients with less than 2 colors

Open uwerat opened this issue 2 years ago • 1 comments

It might be good to have specific shaders for gradients made of 2 colors or less - a very common use case. These shaders do not need precalculated color ramps ( -> textures ) as such an interpolation ( https://registry.khronos.org/OpenGL-Refpages/gl4/html/mix.xhtml ) can be done easily in the shader code.

uwerat avatar Feb 17 '23 07:02 uwerat

For shapes/strokes with linear gradients it would be enough to use a QSGGeometry::ColoredPoint2D geometry. The color parameter can be calculated in QskShapeNode/QskStrokeNode using a QskBox::ColorMap.

uwerat avatar Nov 28 '23 15:11 uwerat