I rendered sea surface bathymetry.
I rendered two rectangle entities pasted some textures on each of them.
The depthtest seems to be producing different outputs for different camera positions.
https://ibb.co/hPE5GT this is how its should be all the time.
https://ibb.co/cgo4Ao this how it becomes at times.
I have made Order Independent Translucency to be false.
Or maybe its a case of incorrect blending
The red one is rendered at a higher altitude, than greenish one
Hi Paras,
Would you mind providing a code sample, preferably one in Sandcastle?
Thanks,
Gabby
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
orderIndependentTranslucency: false
});
var redRectangle = viewer.entities.add({
name : ‘Red translucent rectangle’,
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-110.0, 20.0, -80.0, 25.0),
material : Cesium.Color.RED.withAlpha(0.95),
height : 1150000
}
});
var yellowRectangle = viewer.entities.add({
name : ‘Red translucent rectangle’,
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-110.0, 20.0, -80.0, 25.0),
material : Cesium.Color.YELLOW.withAlpha(0.95),
height : 1100000
}
});
heres a code snippet. I am unable to reproduce the issue on sandcastle, we are using cesium1.39 in our application, is it possible that it was a bug that was fixed is fixed in cesium 1.45?
If you are unable to duplicate in Sandcastle 1.45, I definitely recommend updating versions if it’s a possibility!
If you are still seeing that bug, I will bump the issue you mentioned (which is most likely the culprit) with this report.
Thanks,
Gabby
Updating the version didn’t solve my problem.
Got it, bumped that issue with this report. We’ll post here when it’s resolved. If you do have the bandwidth, it would help if you could track down the issue, or even contribute a fix.
Thanks!
Gabby
Thanks Gaby, for the update, meanwhile do you have any hack or workaround to suggest as it’s kind of urgent for me to get this done.
Thanks and Regards
Paras
I haven’t tried it myself, but you can order entities by DataSource. You can try adding each to their own data source and experimenting with the translucency.
Another thing to try would be diving into the lower level Primitive API. It will give you a lot more control of how objects in your scene are rendered.