Weights can carry more than coverage
Barycentric weights can blend vertex colors: a sample color is λ0 × c0 + λ1 × c1 + λ2 × c2. The current raster reference performs screen-linear RGB interpolation, then its simple gamma-2 output transform. This makes color association visible without introducing a texture or projection library.
Do arithmetic on linear-light values and apply the display transfer policy at the output boundary. Averaging encoded display values produces a different result from averaging linear light. The reference’s square-root encoding is an approximation, not an exact sRGB workflow.
Normals need their own policy. Interpolating unit normals generally produces a vector that is not unit length, so normalize at the shading point if the lighting equation requires a unit direction. Under a non-uniform model scale, normals also need the appropriate inverse-transpose transform rather than blindly reusing the position transform.
Choose weights 0.2, 0.3, and 0.5 for red, green, and blue vertices. Calculate the linear sample color, then compare it with the reference’s encoded bytes.
