CesiumGS / cesium

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

PolylineMaterialAppearance::fragmentShaderSource & FragmentInput struct #12305

Closed mickae1 closed 1 week ago

mickae1 commented 1 week ago

Feature

Hi,

I think that there is no way at this moment to pass the FragmentInput struct to the custom shader PolylineMaterialAppearance :: fragmentShaderSource.

Is that correct ?

If it's true, I would like to be able pass custom attributes :

Custom attributes are also available, though they are renamed to use lowercase letters and underscores. For example, an attribute called _SURFACE_TEMPERATURE in the model would become fsInput.attributes.surface_temperature in the shader.

https://github.com/CesiumGS/cesium/blob/main/Documentation/CustomShaderGuide/README.md

With fragmentShaderText it's possible to pass the FragmentInput struct, but not with fragmentShaderSource

why ?

 fragmentShaderText: `void fragmentMain(
    FragmentInput fsInput,
    inout czm_modelMaterial material
  ) {

I'm interested to get the attributes in the call of the function czm_getMaterial()

ggetz commented 1 week ago

Hi @mickae1, CesiumJS is a big project, so we use GitHub for feature requests and bug tracking exclusively. In the future, please take any questions to the Cesium Forum where there are members of the community and developers from the team who can help. Thanks!

mickae1 commented 4 days ago

@ggetz

Hi @mickae1, CesiumJS is a big project, so we use GitHub for feature requests and bug tracking exclusively. In the future, please take any questions to the Cesium Forum where there are members of the community and developers from the team who can help. Thanks!

I tried in the forum, but no one answered me :

https://community.cesium.com/t/custom-shader-attributes/36603