https://cesium.com/learn/cesiumjs/ref-doc/PostProcessStage.html?classFilter=PostProcessStage
can you show me a example how to declare a url in uniform and how to get in fragment
like this shader example , many effect use texture to pass noise , then i want to know how to pass texture in Cesium
it seems no example in sourcecode
Hey @chen21439 thanks for the question.
We have a couple sandcastle examples using custom post processing stages, I think this one shows how to pass uniforms like you’re looking for? Please take a look and let me know if that helps
i need to pass a texture to shader, but this example is Cesium.color, it some moudle can load Image by Url
the example uniform is Cesium.colr, but i want to pass a image
Dorian
August 28, 2024, 6:35am
7
const noise = await Cesium.Resource.fetchImage({
url: "/static/texture2.png",
});
new Cesium.PostProcessStage({
fragmentShader: fragmentShaderSource,
uniforms: {
texture:()=>noise ,
},
})