Skip to content

Loaders: Ensure all loaders properly label and convert color textures and colors to sRGB / Linear correctly #23283

@gkjohnson

Description

@gkjohnson

Is your feature request related to a problem? Please describe.

From what I can tell these are the loader examples that still are not setting renderer.outputEncoding = sRGBEncoding on the page meaning they don't appropriately set the model color spaces for linear lighting calculations on load where I think the color space should be known at parse time:

Material Colors & Textures

Vertex Colors

I was taking a look at ColladaLoader and OBJLoader, as well. It doesn't look like there's very explicit documentation on color spaces for these formats and they're more specification by convention. Given that our demos don't adjust the default output color space for the renderer it seems like the assumption is that the textures and colors are sRGB. Is there any evidence or example models that show this isn't always the right thing to do?

Describe the solution you'd like

All loaders look correct when setting WebGLRenderer.outputEncoding to sRGBEncoding by appropriately labeling all color textures and converting colors to Linear before setting materials.

Describe alternatives you've considered

--

Additional context

#23272

#23280

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions