Description
I didn't actually run into the problem, but I noticed this while reading the source code. If a material has an envMapRotation property, it will be applied to all cube textures bound to the material and not just the actual environment map. This could become a problem when writing a custom shader (extending directly from NodeMaterial or i.e. MeshStandardNodeMaterial) that uses envMap and envMapRotation but also binds custom cube maps.
Reproduction steps
- create a cube map
- bind it to a
NodeMaterial
- setup an
envMapRotation on the material
Code
Live example
https://jsfiddle.net/ytef53j1/
Screenshots
No response
Version
r186
Device
No response
Browser
No response
OS
No response
Description
I didn't actually run into the problem, but I noticed this while reading the source code. If a material has an
envMapRotationproperty, it will be applied to all cube textures bound to the material and not just the actual environment map. This could become a problem when writing a custom shader (extending directly fromNodeMaterialor i.e.MeshStandardNodeMaterial) that usesenvMapandenvMapRotationbut also binds custom cube maps.Reproduction steps
NodeMaterialenvMapRotationon the materialCode
// code goes hereLive example
https://jsfiddle.net/ytef53j1/
Screenshots
No response
Version
r186
Device
No response
Browser
No response
OS
No response