Any examples or tips on how to make animated shaders for Cesium

Hi,

I have been playing with the Fabric and appearance shader objects. Very nice!

But, Is there a hook to find the render time and frame number etc to support shaders like this.

https://www.shadertoy.com/view/XdsSDn

In ShaderToy you can use shader uniforms such as

uniform float iTime; // shader playback time (in seconds)

uniform float iTimeDelta; // render time (in seconds)

uniform int iFrame; // shader playback frame

Are there equivalent uniforms available in the Cesium renderer?

Thanks very much in advance.

In the shader you can use the built-in uniform czm_frameNumber to get the frame number. I can’t find a czm_renderTime or similar uniform though, but you could add that as a uniform to your material and update it every frame based on the current time in seconds.