Page MenuHome

EEVEE UV not available until you go in and out of edit mode
Closed, ResolvedPublic

Description

Blender Version
Broken: rB6a0d7f9e4126
Worked: ?

Short description of error
On file load, the UV is not displaying correctly until I go in the edit mode.

Exact steps for others to reproduce the error
Open file (simple primitive with UV and a EEVEE material that uses the UV):

  • Switch to Rendered Mode.
  • You don't see the UV.
  • Now go in edit mode, UV is there.
  • If you go to object mode, UV is there as well.

Event Timeline

Dalai Felinto (dfelinto) triaged this task as Confirmed, Medium priority.
Dalai Felinto (dfelinto) moved this task from Backlog to General Bugs on the BF Blender: 2.8 board.

So basically it's because the batches are tagged as dirty when switching from workbench to eevee.

Adding BKE_mesh_batch_cache_dirty(object->data, BKE_MESH_BATCH_DIRTY_SHADING); at the right place should do the trick but I don't know where to put it.
Or maybe we should simply tag the whole scene to update in this case but I don't know how to do it either.

Note this is related to T51931. However see concerns about this approach on T55326.

@Sergey Sharybin (sergey) This is broken again. I can bisect if you want.

Appears to work in latest builds.