Dropping support for glTF 1.0

Hi @Xavier_Tassin,

Here are some ideas related to your last bullet point about the “branching in the fragment shader” using the new features of CesiumJS:

  • This Sandcastle includes an example of mixing translucent and opaque features (see the Translucent Windows option). There are some caveats. CesiumJS uses order-independent translucency by default which tends to make everything a little translucent. We also haven’t tried this technique with very complex scenes.
  • That example uses Feature ID Textures from EXT_mesh_features to identify which regions are what material.
  • Just for completeness’ sake, here’s the Custom Shader Guide for reference.
1 Like

Edit: Just saw the corresponding Github issue (Ideas for supporting `KHR_techniques_webgl` in the new `Model` · Issue #10755 · CesiumGS/cesium · GitHub). This issue was closed in February 2023 so apparently no priority is given to this. However, I still think the ability to apply multiple shaders to a same model is a very important feature.


Hi,

I would like to follow up on the problem encountered with mixed opaque/translucent shading for a same model using customShaders.

I am trying to render the whole model with customShader’s translucencyMode set to Cesium.CustomShaderTranslucencyMode.TRANSLUCENT

I had hoped that the shader could return an alpha value (based on some criteria: branching, opacity map) to make the material translucent in some places.

However, with alpha is set to (or near) 1.0 by the shader, Z sorting goes wrong and polygons appear invisible/reversed or mis-sorted (see screenshot)

The sandcastle mentioned by @ptrgags in the previous post does not work and I can not refer to it any more.

Am I doing something wrong? Is there new development around this issue?

Thanks.