Skip to content

Blinking entity on shader properties update #12532

Open
@Jean-Dum

Description

@Jean-Dum

What happened?

Hello!
When displaying an entity on Cesium (a zone, a polyline, a wall, an ellipse or a cylinder), in precise conditions it disappear during a few frames.

When there is no other entity using the same specific parameters in the datasource, it blinks at every update of its display properties (color, opacity, clampToGround...), event when keeping the same values. If there is at least one other entity in the datasource with those same parameters, it does not blink anymore. I could use a CallbackProperty to make the update smoother but it has terrible performances, it makes the FPS drops to near 0.

Maybe the shaders cashing system has some issue when the entity is the only one to be displayed with those shader options. I tried to have a look in Cesium source code but I couldn't find the reason.

In this sandcastle, the blinking process is reproduced when having a single polygon or polyline with an opacity of 1. I had exactly the same issue with a single polyline or polygon with a different color or clampToGround parameter.

Thank you!

Reproduction steps

  1. Display a single polygon, polyline, cylinder, ellipse or wall in a datasource
  2. Update its material (keep its values but recreate the material)
  3. The entity blinks
  4. Display another entity with same properties
  5. Update its material (keep its values but recreate the material)
  6. It does not blink anymore

Sandcastle example

https://sandcastle.cesium.com/#c=xVddb9owFP0rFi8NEzJpgfIxitYvqZM6rWq3vpQ+uMmFWDU2sx06OvW/z3YSIJCGTquoH1B8r+/1vSfxOWZGJJpReAKJjhCHJ3QKisYTfOts3l7gpqeCa0I5yL3q5yEf8kBwpVFINLkRsQwgH3saKy0mZwuvZ4OSTfAyRmESht5ynmQexTzQVHAUSCAargSbjwX3AiFkqGooEEzIKvoz5MgMCTqWfKUODFxTTdPc6So7pkmeHlqx2RFRkEQG0by32kC660XmTLev1vLBE1OgpIT1krLWvPBbyziE8ALoONI99I3oCEvCQzHxqugT2vfNWIl5SZ9fLBAvFgsGOitcGYTvEv9KB65bU3oeq3wZ2TshUpsnwht4JM3LgbEEUMdSkrl3l4+wYx93a6jZwc3apu8AHzhfu1Xo9FvG28X+mvN+Hb2sMAsdPrn8eY6fqI6O2TQino9b1eXqLDJDaCcIHOCO6aNdiEADN5yv0yp0OgQ6BqV/QeD6/CwHQPMtANTr6IRR/kj5OPtSYBfgNBw4h/iwoP+mA+ewGJxmAk57I3IrOMVo3OdJI56Gy07VlVDUmpW3YIzsOOGRkOckiLzUgI4GOVSvYSRBRQtQF2c9XZPaE76Z42yarTKnNVd/wEwOb0sQHoO+JSw2fIkTnlv07DgBoWSeMqkKgAOW8CsGpa+Bh4auF9ShQH/lJu2MMO8VUGqo5fsJ6RbSrvmu4F141ybaIN5pVoYlT7fHW7n1dZ60G72VKF1378MT3RKeOHC+dilPfBRTvjME3RIIumUQtPztEKzeLiwMnl/zza729+P7b5RIRbNMKpofKBW2+52g0yzRilaZVrR2pRWON14RC+fLqYW1lMmF8xfIhbWvUr+bbxeM0rDtkvE/cpHHJacXpucbw7oBmZgrMtLC7YIIYwuFXdz4n4WY/BBegVjYZJVapa/0nMEgq/wLnUyF1CiWzMO4rmEyZaYgVX+Ig0fQOFAqa61fXw3th3SGaHg0rKz9aRlWUMCIUsYzihm7oc8wrAz6dbN+I5QJEpoj8n0GkpG5XRbtDy4TI8a4XzfT4kgtBHsgci3zXw

Environment

Browser: Chrome and Edge
CesiumJS Version: 1.127.0
Operating System: Windows 10 and 11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions