Hello again awesome community!
Can anyone help me understand why or how to fix the scene background texture image coming in lighter/faded than the image used?
I am attaching the image and screenshot of the image applied as the background texture.
makman
March 24, 2025, 4:06am
2
Looks like this is still the case for the editor, same problem for you. Anyone have a workaround?
This looks like a bug – I’ve reported the issue at:
opened 02:05PM - 24 Mar 25 UTC
Bug
Editor
### Description
Originally reported in:
https://discourse.threejs.org/t/scene-… texture-background-is-lighter-than-image-used/38362
It appears that the editor currently assumes background textures use the working color space, LinearSRGBColorSpace. That's probably correct for .exr or .hdr textures, but it's unlikely that non-HDR textures in PNG/JPG/WebP/AVIF/... formats will be linear. We should assume that these formats are sRGB, like `material.map`.
The incorrect (lighter) output in the issue report is the result expected if we set background.colorSpace to NoColorSpace or LinearSRGBColorSpace, when it should be SRGBColorSpace.
I've checked that fog and tone mapping are not involved in this case. We can get the same result by doing a linear-to-sRGB conversion on the already-srgb input:
```bash
oiiotool -i ~/Downloads/background.jpeg --iscolorspace lin_srgb --colorconvert lin_srgb srgb -o ~/Downloads/background_srgb_oetf.jpeg
```
### Reproduction steps
1. add background texture to Editor (see link)
2. observe lighter background than expected
### Code
n/a
### Live example
n/a
### Screenshots
**Expected**

**Actual**

### Version
r174
### Device
_No response_
### Browser
_No response_
### OS
_No response_
If you’re seeing the same issue in your own code, it can be fixed by assigning texture.colorSpace = SRGBColorSpace
to your background texture. Most PNG/JPG color background textures are likely to be sRGB, HDR/EXR are likely to be linear-srgb, but of course it’s ideal to check the texture if you’re not sure.
2 Likes