CesiumGS / CesiumGS/cesium

`PerInstanceColorAppearance` shader bug: rendering striations without `flat: true`

Open
#8,045 7 comments 0 reactions 0 assignees View on GitHub
category - graphics type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

(Moved from #7947.)

I think `PerInstanceColorAppearance`'s shaders have a problem: they apply `st` attributes if they're set (for all instances)! `PerInstanceColorAppearance`'s documentation doesn't make note of this at all (though maybe it did in the past, given the documentation fix in #7947; https://github.com/AnalyticalGraphicsInc/cesium/pull/7947/commits/df58cd1f549bda94544850aa0a9008c0aa29884d).

![2019_08_06-15_10_07-1145x776](https://user-images.githubusercontent.com/5199745/62573866-a4a09480-b85c-11e9-8190-27a678e9a502.png)

Here is a demonstration; zoom in and rotate the camera about the two ellipses to see the strange rendering effect:

https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html#c=xVRdb9owFP0rFi8NUuaEMUpLKRqi24TER1WqviwTMskteHPsyHbSson/PifBJGGatIdpy4OV63vO9bn3xMmIRBmFF5DoFnF4QRNQNI3xU7HnXIRFOBFcE8pBXrRvAp4ZjgqBg6GUXFyEJlUmSZIAkYSH0Cx6D3LKlc4TE8GEHJ9wTvtEpkdEk/oJRAxa7i3f+RFwhLbHXTSoYz8wRhMFllJCETIStWlzYGETIrV5I7yLn6WI72ArAZTzpt/Dvet+v++idz72u1dX3bZbVlAQ0zn5aoS/UmUK9fz8wX49Tfkp3W2mpdBEU8ErBXOid1iLBxIZFcq5NFh7lOdlYOS9fhQyJrqiPNV28Xg2K+CHkkW0lnSTmqYM3jadz7k5nmL05/McW66TC0bF0jkuZfVDwA+VS4QLvavs/G9mXfvWrLf/1qxuzaw/sOp+uZo+TpeL9WL5MB/P1uPF3Xr1+Pfd65zc83/jXnFVcSJpTDXNQGESRU79ktpM0zV7VK7us72j7vl38KVspbr/g1rg5hraNy23NVR6z2BUNvmexomQGqWSORh7GuKEETMGb5OG30DjUKlc+dCzpGFEM0Sj26B19ncKWihkRCmTeU4ZW9HvELRGQ8/gGzQmjIl8uzS+MbLPIbvOaFZuYoyHngl/ZWkh2IbIWsWf

Contributor guide

Open the contributing guide

Research direction

Start with the PerInstanceColorAppearance shaders and the linked Sandcastle demonstration, reproducing the striations by zooming and rotating around the two ellipses. Check how st attributes and flat: true are handled, then update the relevant documentation if the behavior remains supported. Done means the rendering behavior is corrected or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.