decentraland / sdk

PM repository for SDK
Apache License 2.0
4 stars 4 forks source link

[BUG] Re-setting UVs to the same object fails to load the texture when changed with setPbrMaterial #1029

Open drexample opened 9 months ago

drexample commented 9 months ago

Issue Description:

SDK:

Tool:

Steps to reproduce:

  1. Create a plane shape
  2. Give it a pbr material with a texture
  3. Observe it being completely fine, displaying the texture
  4. Change prbmaterial (either via mutable object, or completely destroying and re-creating the component)
  5. Observe it turning gray
  6. Switch back to old pbr material (even by recreating)
  7. Observe it being completely fine

Expected behaviour:

For the material to change to desired texture

Current behaviour:

Material does not render the texture

Reproduction rate:

100%

Code Snippets:

Material.setPbrMaterial(this.wallDecor[this.currentSpaceWallDecor[i].room][this.currentSpaceWallDecor[i].wall],{texture: Material.Texture.Common({src:globalWallTextures[itemId],
                            wrapMode: TextureWrapMode.TWM_REPEAT})})

Platforms:

Browser:

Environment:

Evidence:

image

image

Additional Notes:

When loaded at scene creation/set as the first PBR material for the plane, the material renders fine.