Closed LaogaKAKA closed 10 months ago
Would you be able to include a Sandcastle example that replicates the issue? That would help us give us more context to determine the issue. Thanks!
I'm closing this issue due to inactivity. If you believe this is still an issue, please feel free to re-open. Thanks!
@ggetz Hi, you can reproduce in here. This issue seems to occur since v1.110.
@qmhc
const viewer = new Cesium.Viewer("cesiumContainer");
const positions = [ Cesium.Cartesian3.fromDegrees(115.98, 22.99, 0.8), Cesium.Cartesian3.fromDegrees(115.99, 22.995, 0.8), Cesium.Cartesian3.fromDegrees(115.995, 22.98, 0.8), Cesium.Cartesian3.fromDegrees(115.98, 22.98, 0.8) ];
const material = new Cesium.Material({ fabric: { type: Cesium.Material.WaterType, uniforms: { baseWaterColor: Cesium.Color.AQUA.withAlpha(0.3), normalMap: Cesium.buildModuleUrl( "Assets/Textures/waterNormals.jpg" ), frequency: 1000, animationSpeed: 0.01, amplitude: 10, specularIntensity: 5 } } });
let hierarchy = new Cesium.PolygonHierarchy( positions,
);
let polygonGeometry = new Cesium.PolygonGeometry({ polygonHierarchy: hierarchy, textureCoordinates: { positions:[ new Cesium.Cartesian2(0, 1), new Cesium.Cartesian2(0, 0), new Cesium.Cartesian2(1, 0), new Cesium.Cartesian2(0, 0), ] }})
const water = new Cesium.Primitive({ show: true, geometryInstances: new Cesium.GeometryInstance({ geometry:polygonGeometry }), appearance: new Cesium.EllipsoidSurfaceAppearance({ material, aboveGround: true }) });
viewer.scene.primitives.add(water);
viewer.camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees(115.985, 22.985, 2000), duration: 0 });
@qmhc 这个你用GroundPrimitive就没这个UV问题了,或者增加textureCoordinates
It's been so long, I didn't expect anyone to come back. Haha, I solved it with Shader, but thank you all! ; )
@qmhc 这个你用GroundPrimitive就没这个UV问题了,或者增加textureCoordinates
朋友,如果我的primitive顶点是动态添加的,那应该怎么确定textureCoordinates呢,或者使用GroundPrimitive的时候怎么解决附着在3dTiles上 的问题呢
Set the "appearance" attribute on the Primitive, and when the geometry object is PolygonGeometry, it displays an issue, as follows: