You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the moment, it's not possible to put custom attribute defined in the GeometryInstance to the vertexShader, this would be great to add more flexibility.
const geometryInstance1 = new Cesium.GeometryInstance(
{
geometry: new Cesium.PolylineGeometry({
positions : Cesium.Cartesian3.fromDegreesArray([
0.0, 0.0,
5.0, 0.0,
5.0, 5.0
]),
width : 10.0,
arcType: Cesium.ArcType.GEODESIC
}),
attributes: {
test: new Cesium.GeometryInstanceAttribute({
componentDatatype : Cesium.ComponentDatatype.FLOAT,
componentsPerAttribute : 1,
normalize : true,
value : [50]
})
}
}
);
const geometryInstance2 = new Cesium.GeometryInstance(
{
geometry: new Cesium.PolylineGeometry({
positions : Cesium.Cartesian3.fromDegreesArray([
0.0, 0.0,
-5.0, 0.0,
-5.0, -5.0
]),
width : 10.0,
arcType: Cesium.ArcType.GEODESIC
}),
attributes: {
test: new Cesium.GeometryInstanceAttribute({
componentDatatype : Cesium.ComponentDatatype.FLOAT,
componentsPerAttribute : 1,
normalize : true,
value : [50]
})
}
}
);
const primitive = new Cesium.Primitive({
geometryInstances : [geometryInstance1, geometryInstance2],
appearance: new Cesium.PolylineMaterialAppearance({
translucent: false,
vertexShaderSource: vertexShader,
fragmentShaderSource: fragmentShader,
material: new Cesium.Material({
// https://github.com/CesiumGS/cesium/wiki/Fabric
fabric: {
materials: {
// The arrowMaterial provides the color and overall shape.
arrowMaterial: {
uniforms: {
genericVariable that can be catched by the fragment shader
....
The text was updated successfully, but these errors were encountered:
Feature
For the moment, it's not possible to put custom attribute defined in the GeometryInstance to the vertexShader, this would be great to add more flexibility.
The text was updated successfully, but these errors were encountered: