Closed gkjohnson closed 2 months ago
See https://twitter.com/garrettkjohnson/status/1772248922288746570
A solution for more consistent results would be to implement a manual interpolation approach when drawing the canvas to the screen. Ie manual linear or bicubic filtering with clamped values while that values are still linear colors.
One issue is that interpolating with linear data vs srgb data doesn't look as expected. Interpolating linear data should result in a perceptually linear gradient but it seems to not.
Note: It seems that three.js always assumes that a texture is in linear color space no matter what. Is this an issue? I think it used to behave differently (around r140 to r150)
It changes the values that are being interpolated. When the canvas is stretched it's interpolating the 256-bit color values and when the target is stretched it's the large floating point values.