Cubemap in custom shader

Hello everybody,

is it posible to integrate a cubemap texture as uniform within a costum shader?

Thanks in advance for any help.

Johannes

Hi @Studio_Fluffy,

Thank you for your question! @ptrgags has a ton of experience with custom shaders and should be able to help you out :grinning:

Best,
Sam

Hi @Studio_Fluffy, unfortunately cubemap textures are not currently supported. This is a known issue, please see here: Make it easier to load textures and cubemaps · Issue #9741 · CesiumGS/cesium · GitHub

Thank your for your help

Best Johannes

Does ist make sense to bind the 6 textures of a cubemap as normal textures as a work around?

Best+
Johannes

Or could you tell me, what part of cesium classes i have to look at to implement cube map support by myself?

Best

Johannes

@ptrgags

Hello Peter,

we are interested in the same issues, could you give us some tips, should we do the way described in the issue#9741

In which way is this only experimental - does it survive in the next versions ?

Regards

Rüdiger

Hi @Ruediger_Brand,

Indeed issue #9741 is the recommended approach. @Studio_Fluffy expressed interest in implementing this since here at Cesium our priority right now is 3D Tiles 1.1 related changes. You two might want to coordinate if you both need this feature.

In regards to it being experimental, I’ll say this:

Best,
Peter

@ptrgags : Thank you for the tips, we have done some evaluations and think it looks good.

One more question to customShaders - in the moment the customShader is binded to a 3dTileSet.

Can I use a customShader with the shadowMap of the terrain/scene ?

Regards

Rüdiger

Hi @Ruediger_Brand,

Currently, CustomShader can only be attached to a Cesium3DTileset or a ModelExperimental, not terrain.

In the long-term, we actually want to change our terrain system to use 3D Tiles, in which case CustomShader would be usable since it’s the same code. However, we do not currently have a timeline for when this will be addressed.

Best,
Peter