I am currently using Cesium.Primitive and passing uniform data through fs and vs in appearance , finding that fs and vs cannot receive this uniform data, but ms can.
I wish to pass a float type value of ‘u_time’ as a uniform. However, when ‘u_time’ is utilized in ‘fragment shader’, an error occurs. Could you identify any mistakes in this transfer method?
My code and error are shown in the picture.
You’re trying to offset a vertex base on the value of u_time correct?
I’m not sure this way of offsetting vertices based on materials is the intended use case of the material system. I think the best way to do this would be to specify a BumpMap and create a texture from the u_time value.
However, I found that the value is not being passed correctly. When I retrieve this value in the MS and add it to the coordinates, the result is not as expected. Do you know what could be the potential reasons?
It may help to know the final effect you’re looking to achieve.
If you’re looking to create a “flow” affect with the bumpMap (I’m just assuming this from your material name), I would recommend doing something like this sandcastle example.