-
Notifications
You must be signed in to change notification settings - Fork 115
Description
The environments of this component look very washed out when enabling colorManagement. This was already raised in #49 but closed as the color space and gamma handling of A-Frame itself was subject to change. Now that we have colorManagement it would be nice if this component properly supports this.
There are various elements in an environment. In short:
- The sky shaders don't do any encoding (for better or for worse) so are unaffected by the
colorManagement - The ground uses two textures (
mapandemissiveMap) which can be set toTHREE.sRGBEncoding - The dressing material color needs to be converted
- The colors of the lights are automatically handles as those are core built-in A-Frame components that handle
colorManagement
So effectively, only the ground textures and dressing material color require code changes. Which I attempted here (https://github.com/mrxz/aframe-environment-component/tree/color-management). There will be small visual differences since lighting calculations now happen in linear space, but it should no longer be washed out:
| Before (no colorManagement) | Before (colorManagement) | After (colorManagement) |
|---|---|---|
![]() |
![]() |
![]() |
There are, however, environment presets that differ more:
| Before | After |
|---|---|
![]() |
![]() |
This is caused by the usage of emissive textures. The 'blending' of the diffuse color with the emissive color now (correctly) happens linearly and is afterwards encoded into sRGB. But as a result it retains more of its brightness compared to (naively) blending the two colors in sRGB space.
Sadly there is no way to ensure all presets will appear identical with colorManagement on or off. Especially the emissive textures result in quite distinct differences. Nevertheless I think it's an improvement over the washed out look and the changes have zero impact in case colorManagement is not enabled.




