CesiumGS / CesiumGS/cesium

DepthTest disabled Billboard still blends with (alpha textured) background primitive

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

Description

We are using SVG images as `image` on a `Billboard`. To always render the Billboards on front we have set `disableDepthTestDistance = Number.POSITIVE_INFINITY`. It renders OK, except when a primitive with an alpha enabled material is positioned behind the Billboard. Then strange things happen where it seems white colors from the texture are made transparent, but other colors are not.

![bug](https://user-images.githubusercontent.com/881510/34606123-69c62796-f20e-11e7-9f3d-6ed42b20c4ca.gif)

The given example is with Order Independent Transparency disabled, but also occurs with it enabled. In the example I have also reduced the number of `frustums` to 1, in order to eliminate causes related to multiple frustums, so this seems to not be the cause either.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Billboard case using an SVG image with disableDepthTestDistance set to Number.POSITIVE_INFINITY, placing an alpha-enabled primitive behind it. Compare the result with Order Independent Transparency enabled and disabled, keeping frustums at 1 as described. Done means the Billboard renders correctly without making white texture colors transparent.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.