TinyVG / specification

The specification for TinyVG. This is the central authority for the file system

Home Page:https://tinyvg.tech/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarify that gradients are interpolated in linear color space

ikskuh opened this issue · comments

person on lobste.rs wrote:
Gradients are implicitly in sRGB’s pseudo-gamma space, therefore incorrect. See reference rendering.

It should be specified in which color space and color format the interpolation should happen:

http://scanline.ca/gradients/

The most widespread one is probably "linear RGB interpolation", so this would be a good choice here.

The math for gradient blending is fairly easy and i've implemented a verification shader on shadertoy.com.

Colors need to be interpolated in linear color space and require gamma application after that:

NOTE: This image must be viewed without any scaling! Otherwise the bayer dithering won't work properly