-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Billboard depth testing performance improvements #6781
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for the pull request @hpinkos!
Reviewers, don't forget to make sure that:
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
@bagnell can you review? |
Here's the sample code from my last PR: var viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: Cesium.createWorldTerrain()
});
viewer.scene.globe.depthTestAgainstTerrain = true;
var e = viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-122.1958, 46.1915),
billboard : {
image : '../images/Cesium_Logo_overlay.png',
heightReference : Cesium.HeightReference.CLAMP_TO_GROUND,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM
}
});
viewer.trackedEntity = e; var viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: Cesium.createWorldTerrain()
});
viewer.scene.globe.depthTestAgainstTerrain = true;
var e = viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-122.1958, 46.1915),
label : {
text : 'Clamped to ground',
heightReference : Cesium.HeightReference.CLAMP_TO_GROUND,
horizontalOrigin : Cesium.HorizontalOrigin.CENTER,
verticalOrigin : Cesium.VerticalOrigin.BOTTOM,
fillColor : Cesium.Color.BLACK,
showBackground : true,
backgroundColor : new Cesium.Color(1, 1, 1, 0.7),
backgroundPadding : new Cesium.Cartesian2(8, 4)
}
});
viewer.trackedEntity = e; |
Thanks @bagnell, I think this is ready now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6699
Moves the billboard depth test logic to the vertex shader when texture reads from the vertex shader are supported. Otherwise it falls back to doing the depth test in the fragment shader.