Customized polyline in the back of earth is still visible, depth test invalid?

65 views
Skip to first unread message

lmw....@gmail.com

unread,
Oct 21, 2018, 12:08:01 AM10/21/18
to cesium-dev
1. A concise explanation of the problem you're experiencing.

I am creating a customized polyline, while it still could be seen in the back of the earth, it seems that there are some problems with depth test. One more thing is that works fine on older Cesium versions such as 1.3X, but not 1.45-1.50.


2. A minimal code example. 

LinesCollection.add(new Cesium.Primitive({
     geometryInstances : new Cesium.GeometryInstance({
     geometry : new LineGeometry({
     positions : this.positionArr,
     width : 1.0,
     vertexFormat : LineColorAppearance.VERTEX_FORMAT,
     })
   }),
   appearance : new LineColorAppearance({
        translucent : true,
        color : this.color,
        renderState: {
           depthTest : {
           enabled : true,
           func : Cesium.DepthFunction.LESS
        },
        depthMask:true           
       }
    })
 }));

the FS uesed in LineColorAppearance is PerInstanceFlatColorAppearanceFS 

I found that the method of depth test has been changed since cesium 1.45, does it means I have to change some code that is fine for older version?



Omar Shehata

unread,
Oct 22, 2018, 3:55:45 PM10/22/18
to cesium-dev
The closest thing I found in the change log was 1.33 adding the depthFailMaterial:


Does using these new materials allow you to do what you need? If not, it'd help me narrow this down a lot if you can put together a Sandcastle example of how it used to work in older versions vs how it looks now. You can access older versions of Sandcastle with this link:


This one is for version 1.30, and you can change that to get other versions. I linked to the offline example since loading imagery and terrain has changed a bit since then, but since we're only testing polylines it shouldn't matter. 
Reply all
Reply to author
Forward
0 new messages