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

Globe translucency #8726

Merged
merged 125 commits into from
May 26, 2020
Merged
Changes from 1 commit
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
9a2cabd
Initial front face translucency prototype
lilleyse Feb 17, 2020
537f22d
Add user options for controlling translucency fade distance
lilleyse Mar 5, 2020
e31106d
Command cleanup
lilleyse Mar 5, 2020
0855419
Fix OIT
lilleyse Mar 5, 2020
9e41819
ENABLED vs. FRONT_FACES_ONLY working better
lilleyse Mar 5, 2020
a3081c1
Make sun and moon appear through the globe
lilleyse Mar 5, 2020
6d15583
Fix eslint
lilleyse Mar 5, 2020
84106eb
Prevent ellipsoid occlusion culling when globe is translucent
lilleyse Mar 5, 2020
0f02d39
Fix classification primitives in FRONT_FACES_ONLY mode
lilleyse Mar 8, 2020
e1129f7
Destroy globeTranslucency
lilleyse Mar 8, 2020
ff9aedd
Fix classification primitives in ENABLED mode, though they are slight…
lilleyse Mar 9, 2020
3341ab2
Fix bug where composite command wasn't being executed if there weren'…
lilleyse Mar 13, 2020
c784528
Fix eslint
lilleyse Mar 15, 2020
3203955
Fix multifrustum for FRONT_FACES_ONLY mode
lilleyse Mar 15, 2020
5f57601
Early return if no classification
lilleyse Mar 16, 2020
b05ff45
Merge branch 'master' into globe-alpha
lilleyse Mar 22, 2020
17bd750
Disable fog in back faces pass
lilleyse Mar 22, 2020
5fd048e
Fixed classification and ordering artifacts with new approach
lilleyse Mar 24, 2020
beb9e07
More cleanup
lilleyse Mar 25, 2020
88a87df
Merge branch 'master' into globe-alpha
lilleyse Mar 26, 2020
4d7aec8
Use Sampler.NEAREST
lilleyse Mar 26, 2020
c547f6d
Remove depth texture requirement
lilleyse Mar 26, 2020
27dac93
Fix eslint
lilleyse Mar 26, 2020
5f417a9
Fix draw command ordering when underground
lilleyse Mar 26, 2020
af16d4c
Merge branch 'master' into globe-alpha
lilleyse Mar 28, 2020
75d8888
Unindent
lilleyse Mar 28, 2020
d662bb6
Finish uniform map derived commands
lilleyse Mar 28, 2020
b53a566
Separate translucency settings for front and back faces of globe
lilleyse Mar 29, 2020
ce3f07f
Use bitfields in GlobeTranslucency
lilleyse Mar 29, 2020
f34c8c4
Simplify derived commands
lilleyse Mar 29, 2020
183080a
Fix pickPosition
lilleyse Mar 29, 2020
a860e4d
Remove frameState.globeTranslucent
lilleyse Mar 29, 2020
92235d2
Fix picking problem related to sun being visible when it wasn't
lilleyse Mar 29, 2020
fd061d0
Re-enable test
lilleyse Mar 29, 2020
e6936cd
Fix unit tests
lilleyse Mar 30, 2020
e25d3a5
Fix picking for classification primitives on translucent globe
lilleyse Mar 30, 2020
074c65c
Fix 2D
lilleyse Mar 30, 2020
1277b36
Merge branch 'master' into globe-alpha
lilleyse Mar 30, 2020
65fce65
Fix depthTestAgainstTerrain when front is translucent and back is opaque
lilleyse Mar 30, 2020
6f4933d
Assume translucency if globe base color has an alpha < 1.0
lilleyse Mar 30, 2020
32e2953
Fix pickTranslucentDepth for ground primitives
lilleyse Mar 31, 2020
3a801bc
Disable billboard shader clamping if globe is translucent or depthTes…
lilleyse Mar 31, 2020
191eeef
Add missing doc
lilleyse Mar 31, 2020
6d4bacc
Detect uniform map changes in smarter way
lilleyse Mar 31, 2020
76fe25c
CHANGES.md typo
lilleyse Mar 31, 2020
5dc8541
Only render depth-only command for the first globe layer
lilleyse Mar 31, 2020
7f88125
Disable shadows on translucent globe for now
lilleyse Mar 31, 2020
40a12ad
Undefined render state fix
lilleyse Mar 31, 2020
c8497c3
Don't render HDR commands when depth-only pass is enabled
lilleyse Apr 1, 2020
85e9cf9
Fix sky atmsophere HDR strangeness
lilleyse Mar 31, 2020
756ce66
Unrelated clipping planes edge style fix in sandcastle demo
lilleyse Apr 1, 2020
e800176
Cleanup
lilleyse Apr 1, 2020
a954d7c
Added getNumberOfTextureUniforms
lilleyse Apr 1, 2020
95eceec
Merge branch 'master' into globe-alpha
lilleyse Apr 4, 2020
ed54857
Always evaluate translucency
lilleyse Apr 5, 2020
8611c68
Add sandcastle demo
lilleyse Apr 5, 2020
88853bc
Rename variables in public API
lilleyse Apr 5, 2020
b287ee1
Add globe interior demo
lilleyse Apr 5, 2020
b4144c6
Add vector data to sandcastle
lilleyse Apr 5, 2020
431fc35
Fix eslint
lilleyse Apr 5, 2020
7025f54
Simplify globe interior demo
lilleyse Apr 5, 2020
0abe05d
Update CHANGES.md
lilleyse Apr 5, 2020
1d70046
Fix globe material alpha blending
lilleyse Apr 5, 2020
7a26102
Update globe interior demo
lilleyse Apr 5, 2020
cff6807
Fix tests
lilleyse Apr 5, 2020
e7b6a60
Merge branch 'master' into globe-alpha
lilleyse Apr 6, 2020
f33d59e
Update CHANGES
lilleyse Apr 6, 2020
6d0a5b4
Simplify pick shader
lilleyse Apr 7, 2020
1c07ca4
Add underground color
lilleyse Apr 12, 2020
7416874
Update CHANGES.md for underground color
lilleyse Apr 12, 2020
ee995e3
Merge commit '05380a6d7f7869483f63d6a3bbbd89d68ebd1531' into globe-alpha
lilleyse Apr 17, 2020
1e8fbdf
Merge commit '2fd0e8f7e4212bd1e7084299187f70597a6bbfd8' into globe-alpha
lilleyse Apr 17, 2020
a76ee02
Merge remote-tracking branch 'origin/master' into globe-alpha
lilleyse Apr 17, 2020
31bad56
Improve sky atmosphere + translucent globe
lilleyse Apr 18, 2020
b913983
Merge branch 'master' into globe-alpha
lilleyse Apr 18, 2020
b125c0c
Improve sky atmosphere when underground
lilleyse Apr 18, 2020
e654322
Clean up sky atmosphere shader
lilleyse Apr 19, 2020
bf68a82
Add sky atmsophere code to common shader
lilleyse Apr 19, 2020
444d4c1
Remove unused element in uniform
lilleyse Apr 19, 2020
58ca8d6
Run skyatmosphere shader per-pixel when globe is translucent
lilleyse Apr 20, 2020
f7bbc3c
Demo tweaks
lilleyse Apr 20, 2020
7891bba
Update globe translucency properties on query and add scene unit test
lilleyse Apr 20, 2020
ed9a9f7
Finish scene tests
lilleyse Apr 20, 2020
83ba3b6
Merge remote-tracking branch 'origin/master' into globe-alpha
lilleyse Apr 20, 2020
0e2b9b3
Add translucency check to 2D case
lilleyse Apr 22, 2020
3f14850
Add globe translucency tests
lilleyse Apr 22, 2020
73b9349
Fix alpha blending of classification primitives by switching to premu…
lilleyse Apr 23, 2020
3c1a04a
Scene integration tests
lilleyse Apr 23, 2020
90ff2b6
Cleanup and globe tests
lilleyse Apr 23, 2020
9aed8b7
Fix CI test
lilleyse Apr 24, 2020
71b85f4
Fix bugs uncovered during testing
lilleyse Apr 24, 2020
f90e141
Remove outdated TODO
lilleyse Apr 24, 2020
cd2f862
Fix time-dependent test
lilleyse Apr 24, 2020
16c7a4e
Merge remote-tracking branch 'origin/master' into globe-alpha
lilleyse Apr 29, 2020
dc4bd64
Update CHANGES.md [skip ci]
lilleyse May 11, 2020
0216d45
Fix sandcastle demo
lilleyse May 11, 2020
64a3d19
Add translucency rectangle
lilleyse May 11, 2020
d680dc3
Style [skip ci]
lilleyse May 12, 2020
fe49f05
Merge branch 'master' into globe-alpha
lilleyse May 12, 2020
a95e8e1
Add translucency rectangle to sandcastle example [skip ci]
lilleyse May 12, 2020
f71eef9
Added GlobeTranslucencyState
lilleyse May 13, 2020
109288e
Fixed derived commands
lilleyse May 16, 2020
92e3f30
Remove invisible translucency state to support classification on invi…
lilleyse May 16, 2020
c10cfcd
Fix picking in 2D
lilleyse May 16, 2020
9e491a0
Use better image for sandcastle [skip ci]
lilleyse May 16, 2020
e2f63c3
Don't do depth only shader if clipping planes are enabled [skip ci]
lilleyse May 16, 2020
908615a
Updated unit tests
lilleyse May 17, 2020
65a49de
Render full sky atmosphere when globe is hidden
lilleyse May 14, 2020
96120fa
Merge branch 'sky-atmosphere-per-fragment' into globe-alpha
lilleyse May 17, 2020
c4c635a
Merge remote-tracking branch 'origin/underground-color' into globe-alpha
lilleyse May 18, 2020
6494505
Fix CHANGES.md [skip ci]
lilleyse May 18, 2020
c6bb5a1
Merge branch 'sky-atmosphere-per-fragment' into globe-alpha
lilleyse May 23, 2020
a20fdd6
Turn off globe lighting in demo
lilleyse May 23, 2020
5c47b77
Reorder ifdef's
lilleyse May 23, 2020
aad027b
Reorder updateFrameState
lilleyse May 23, 2020
775096a
Added GlobeTranslucency to group translucency options
lilleyse May 23, 2020
72f6faa
Fix test
lilleyse May 24, 2020
34ff8ce
Remove frameState from update function
lilleyse May 24, 2020
589d607
Premultiply alpha for ground polylines
lilleyse May 24, 2020
2a275d4
Fix tests
lilleyse May 24, 2020
f2fae6f
Fix translucencyEnabled not applying when base color alpha is < 1.0
lilleyse May 24, 2020
18f3e06
Add back translucency gradient to sky atmosphere
lilleyse May 25, 2020
bb6fae5
Merge branch 'master' into globe-alpha
lilleyse May 25, 2020
254225c
Add define for globe translucency to SkyAtmosphereCommon
lilleyse May 25, 2020
cdf8fdb
Sky atmosphere fix to not use camera height when intersecting the ell…
lilleyse May 25, 2020
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
Disable billboard shader clamping if globe is translucent or depthTes…
…tAgainstTerrain is false
lilleyse committed Mar 31, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 3a801bcbaa21edd246649ca2e2a9572ecd73f3af
9 changes: 7 additions & 2 deletions Source/Scene/BillboardCollection.js
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ import BillboardCollectionVS from '../Shaders/BillboardCollectionVS.js';
import Billboard from './Billboard.js';
import BlendingState from './BlendingState.js';
import BlendOption from './BlendOption.js';
import GlobeTranslucency from './GlobeTranslucency.js';
import HeightReference from './HeightReference.js';
import HorizontalOrigin from './HorizontalOrigin.js';
import SceneMode from './SceneMode.js';
@@ -1180,7 +1181,7 @@ import VerticalOrigin from './VerticalOrigin.js';
}

var disableDepthTestDistance = billboard.disableDepthTestDistance;
var clampToGround = billboard.heightReference === HeightReference.CLAMP_TO_GROUND && billboardCollection._scene.context.depthTexture;
var clampToGround = billboard.heightReference === HeightReference.CLAMP_TO_GROUND && context.depthTexture;
if (!defined(disableDepthTestDistance)) {
disableDepthTestDistance = clampToGround ? 5000.0 : 0.0;
}
@@ -1240,7 +1241,11 @@ import VerticalOrigin from './VerticalOrigin.js';

function writeTextureCoordinateBoundsOrLabelTranslate(billboardCollection, context, textureAtlasCoordinates, vafWriters, billboard) {
if (billboard.heightReference === HeightReference.CLAMP_TO_GROUND) {
billboardCollection._shaderClampToGround = billboardCollection._scene.context.depthTexture;
var scene = billboardCollection._scene;
var globeTranslucent = GlobeTranslucency.isTranslucent(scene.globe);
var depthTestAgainstTerrain = defined(scene.globe) && scene.globe.depthTestAgainstTerrain;

billboardCollection._shaderClampToGround = context.depthTexture && !globeTranslucent && depthTestAgainstTerrain;
}
var i;
var writer = vafWriters[attributeLocations.textureCoordinateBoundsOrLabelTranslate];