I would like to use the terrain’s normals in my fabric shader. Could i do that somehow? My naive idea
const material = new Cesium.Material({
fabric: {
uniforms: {
image: “…/images/earthspec1k.jpg”,
heightField: “…/images/earthbump1k.jpg”,
},
materials: {
bumpMap: {
type: “BumpMap”,
uniforms: {
image: “…/images/earthbump1k.jpg”,
},
},
},
source: czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); vec4 color; material.diffuse = materialInput.normalEC;//color.rgb; material.alpha = 0.5;//color.a; return material; }
,
},
});
viewer.scene.globe.material = material
Will those be available in shader?
const viewer = new Cesium.Viewer(“cesiumContainer”, {
terrain: Cesium.Terrain.fromWorldTerrain({
requestVertexNormals: true, //Needed to visualize slope
}),
});