8thwall / web

8th Wall Web projects and resources.
519 stars 326 forks source link

XR Extras do not use colorManagement #191

Open ephb opened 2 years ago

ephb commented 2 years ago

When using the colorManagement property in an a-scene there is a significant difference in brightness between a material created by using pbrMaterialComponent compared to a material component on a geometry node using the same textures. This also applies to the basicMaterialComponent.

The following explanation is what i assume is happening, please correct me if I am wrong:

The renderer in aframe supports a property called color management which enables a color managed linear workflow. Upon creating a new material this sets the color encoding of the textures accordingly.

When one creates an aframe material and sets its texture trough the src attribute this happens automatically.

But when using pbrMaterialComponent with the same texture it appears much brighter. Supposedly because setting the encoding is not done.