Skip to content
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

Clamping to 3D Tiles #6934

Merged
merged 42 commits into from
Sep 28, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ab1ed46
pick from ray functions
lilleyse Jul 19, 2018
62d6658
Removed Clamp to Tileset demo
lilleyse Sep 6, 2018
5e133ff
Add development demos
lilleyse Sep 6, 2018
318821f
Add clamp to 3d tiles demo
lilleyse Sep 6, 2018
236c850
Partial updates
lilleyse Sep 10, 2018
3e58014
Fixed sampleHeight to work with entities and updated Sandcastle example
lilleyse Sep 11, 2018
59570f5
Rename
lilleyse Sep 12, 2018
55734c7
Expand on documentation
lilleyse Sep 13, 2018
3001c5b
Organize pick tests into folders
lilleyse Sep 13, 2018
e111e3f
Merge branch 'master' into pick-ray-2
lilleyse Sep 13, 2018
e6688e8
Combine pick and pickPosition from ray functions together. Update doc
lilleyse Sep 15, 2018
653fe19
Tests
lilleyse Sep 15, 2018
3a1566c
Remove sun visibility demo
lilleyse Sep 15, 2018
4e079b7
Add warnings to Sandcastle demos
lilleyse Sep 15, 2018
1e26b8b
Renames in PickSpec
lilleyse Sep 15, 2018
1c98b5d
Merge branch 'translucent-pick-fix' into pick-ray-2
lilleyse Sep 15, 2018
d8490eb
eslint fixes
lilleyse Sep 15, 2018
7c787c7
Add initialTilesLoaded helper and cleanup sandcastle demo
lilleyse Sep 17, 2018
7799cd0
Renamed Ground Clamping to Clamp to Terrain
lilleyse Sep 17, 2018
9a8f03d
Add Clamp to 3D Model demo
lilleyse Sep 17, 2018
ffc35c6
Cleanup updates
lilleyse Sep 17, 2018
9abdbb6
Added test for initialTilesLoaded event
lilleyse Sep 17, 2018
a37ad74
Add label to Clamp to 3D Model demo
lilleyse Sep 17, 2018
9f547b4
Revert ae0a4c15 (uniform splits in 3D orthographic) which seems to be…
lilleyse Sep 17, 2018
7671f71
Added back clamping to the globe and wrote tests for checking the globe
lilleyse Sep 17, 2018
d4f6dae
Update CHANGES.md
lilleyse Sep 17, 2018
6f0b8f9
Merge branch 'master' into pick-ray-2
lilleyse Sep 18, 2018
d57b749
Merge branch 'master' into pick-ray-2
lilleyse Sep 19, 2018
45a77b3
Remove unused useLogDepthDirty
lilleyse Sep 21, 2018
7e54834
Cleanup in prep for offscreen picking
lilleyse Sep 21, 2018
9465e34
Merge branch 'master' into pick-ray-2
lilleyse Sep 25, 2018
faafedf
Add comment about writing translucent depth in pick pass and don't re…
lilleyse Sep 25, 2018
def0ddd
Attempt to fix failing Travis tests
lilleyse Sep 25, 2018
6afb0d0
Fix eslint
lilleyse Sep 26, 2018
59df7ed
Merge branch 'master' into pick-ray-2
lilleyse Sep 26, 2018
e253de6
Move hide/show objects outside of drill pick
lilleyse Sep 26, 2018
9c8c800
Update Sandcastle demo to not trigger infinite loop
lilleyse Sep 26, 2018
8209e29
Expand excludes object test
lilleyse Sep 26, 2018
1cda2e1
Revert "Update Sandcastle demo to not trigger infinite loop"
lilleyse Sep 28, 2018
7da184d
Revert "Move hide/show objects outside of drill pick"
lilleyse Sep 28, 2018
e67aaa4
Merge branch 'master' into pick-ray-2
lilleyse Sep 28, 2018
eaab71c
Add sampleHeightSupported check to demo
lilleyse Sep 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comment about writing translucent depth in pick pass and don't re…
…turn early in Sandcastle demo
  • Loading branch information
lilleyse committed Sep 25, 2018
commit faafedf0998dd48d49b64885d5f5c4c153bfece0
11 changes: 5 additions & 6 deletions Apps/Sandcastle/gallery/Clamp to 3D Tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
var scene = viewer.scene;
var clock = viewer.clock;

if (!scene.clampToHeightSupported) {
console.log('This browser does not support clampToHeight.');
return;
}

var entity;
var positionProperty;
var dataSourcePromise = Cesium.CzmlDataSource.load('../../SampleData/ClampToGround.czml');
Expand All @@ -60,7 +55,11 @@
endTransform : Cesium.Matrix4.IDENTITY
});

tileset.initialTilesLoaded.addEventListener(start);
if (scene.clampToHeightSupported) {
tileset.initialTilesLoaded.addEventListener(start);
} else {
console.log('This browser does not support clampToHeight.');
}

function start() {
clock.shouldAnimate = true;
Expand Down
6 changes: 6 additions & 0 deletions Source/Scene/DerivedCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,12 @@ define([
if (!defined(pickState)) {
var rs = RenderState.getState(renderState);
rs.blending.enabled = false;

// Turns on depth writing for opaque and translucent passes
// Overlapping translucent geometry on the globe surface may exhibit z-fighting
// during the pick pass which may not match the rendered scene. Once
// terrain is on by default and ground primitives are used instead
// this will become less of a problem.
rs.depthMask = true;

pickState = RenderState.fromCache(rs);
Expand Down