In three-text I’ve been using a RawShaderMaterial
with a color as an input uniform. In the vertex shader I use LinearTosRGB
(from encodings_pars_fragment
) to ensure the output is in the sRGB color space.
Is there a way to respond dynamically to the output color space when using RawShaderMaterial, so that it works with any output color space? Something like linearToOutputTexel
, but accessible from my custom RawShaderMaterial subclass?