Cube environment map not working on meshStandardMaterial.envMap & scene.environment

so in webr xr lighting estimation we get xrLight.environment cubeMap as seen in this webxr example three.js examples

which
when used on meshPhongMaterial.envMap and scene.background works fine
but
when used on scene.environment or meshStandardMaterial.envMap does not work

am i missing something here ?

i tried material.needsUpdate=true after updating envMap but no luck


Top sphere : cubemap on meshPhong.envMap
Bottom sphere: cubemap on meshStandard.envMap
Background : cubemap on scene.background

Using PMREMGenerator .fromCubemap() texture as environment i’m able to get this output (bottom sphere is meshstandard mat)

also there’s some warnings three.module.js:27070 WebGL: INVALID_OPERATION: drawBuffers: COLOR_ATTACHMENTi_EXT or NONE

&

using texture.mapping = THREE.CubeReflectionMapping gives black

@Mugen87 any idea what can be done here ?

This use case is currently not supported. However, there is a PR trying to fix this:

1 Like