CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.73k stars 3.45k forks source link

glTF polygons with alphaMode:BLEND always rendered double-sided #11882

Open y2kiah opened 6 months ago

y2kiah commented 6 months ago

What happened?

Translucent glTF polygons are rendered double-sided in CesiumJS when the glTF material does not specify doubleSided, and backface culling is enabled. The following material provides a reproducible test case:

"materials": [
    {
      "extensions": {
        "KHR_materials_unlit": {}
      },
      "alphaMode": "BLEND",
      "pbrMetallicRoughness": {
        "baseColorFactor": [
          0.3,
          0.4,
          1,
          0.15
        ]
      }
    }
  ]

Reproduction steps

  1. Add tileset with glTF tile content using example material
  2. Enable back-face culling in CesiumJS
  3. Add example tileset to CesiumJS scene

Sandcastle example

No response

Environment

Browser: Chromium CesiumJS Version: 1.115 Operating System: Ubuntu 22.04

vinsonws commented 5 months ago

I also encountered the same problem, but our project happened to run on this problem, so I wanted to ask if this is a bug or a feature.