-
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
More robust point cloud post processor #5455
Merged
lilleyse
merged 258 commits into
CesiumGS:point-cloud-processor
from
AnimatedRNG:point-cloud-processor-ss
Oct 19, 2017
Merged
Changes from 202 commits
Commits
Show all changes
258 commits
Select commit
Hold shift + click to select a range
3cbbbe0
Now moves extensions to the top of the shader
AnimatedRNG 8268a56
Not-so-functional existing (non-derived) post-processing framework
AnimatedRNG 86fac01
Adds new derived command code
AnimatedRNG cef8a2a
Clearing the framebuffers now happens in the correct order -- nothing…
AnimatedRNG 8e2d7ca
Now properly hands off data between stages
AnimatedRNG 7f4827b
Now correctly currying depth
AnimatedRNG 4adc68c
Temporarily reducing the number of frustra so that the depth values d…
AnimatedRNG 32810ec
Moves shaders into their own files
AnimatedRNG 9394cca
Working point occlusion filter
AnimatedRNG f77cb8b
Fixes resizing/destroy issues and takes options now
AnimatedRNG 3c9bf84
Now drawing color point cloud
AnimatedRNG d36c8ff
Adds enabled property
AnimatedRNG b5fd034
Adds new Sandcastle demo for point cloud post processing
AnimatedRNG 303ad68
Sandcastle demo now includes even more options
AnimatedRNG 197b54c
Adds region growing pass
AnimatedRNG 3db0993
Adds more configurable parameters to PointCloudPostProcessor
AnimatedRNG 449f325
Fixes bug where additional region growing passes didn't grow empty areas
AnimatedRNG ce5bf10
More sane parameter for the number of region growing passes
AnimatedRNG 2520c89
Some code cleanup in the region growing filter
AnimatedRNG 8331358
Sector histogram modification has better branching now
AnimatedRNG c22a98e
Better inverse trig
AnimatedRNG 6930938
Some code cleanup and branch optimization
AnimatedRNG 03f2266
Updates capability flags for WebGL 2
AnimatedRNG d6b1869
Newline after version in ShaderSource
AnimatedRNG 5862b6b
Updates pointcloud processor to WebGL 2.0
AnimatedRNG 37cef07
Adds support for the EXT_color_buffer_float extension
AnimatedRNG e9855c0
Moves GLSLModernizer to its own file
AnimatedRNG 4e9ad17
Fixes issues where glslModernize does not add a semicolon when updati…
AnimatedRNG 1925164
Refactors GLSLModernizer
AnimatedRNG 1196a06
Another refactor of GLSLModernizer -- now supports cleaning up Shader…
AnimatedRNG 99304d1
Modifies PointCloudPostProcessor so that it now uses the new GLSLMode…
AnimatedRNG af64702
Uses the correct internal format for floating point RGBA textures in …
AnimatedRNG 915442c
GLSLModernizer is now preprocessor-branch aware
AnimatedRNG c2cea47
Adds GLSLModernizer calls to OIT
AnimatedRNG 5e66040
GLSLModernizer now ignores shaders that are already written in GLSL E…
AnimatedRNG 5562f24
Adds WebGL 2 checks
AnimatedRNG a1db0a3
PointCloudPostProcessor now loads different shaders depending on the …
AnimatedRNG 1c0f9ed
PointOcclusionPass now takes advantage of non-constant array indexing
AnimatedRNG 33e6809
Starts the transition over the multifrustrum support
AnimatedRNG 6ae66d2
Point occlusion operator now writes depth to a color attachment
AnimatedRNG 636a423
Adjusts defaults for the region growing parameter
AnimatedRNG 3666593
Removes unnecessary write
AnimatedRNG dcaafaf
Fixes the GLSL ES 1.00 shaders
AnimatedRNG f81d356
Code review fixes
AnimatedRNG 92c0422
Adds distance-based depth and triangle wave method
AnimatedRNG 2a8e842
Adds abs() calls for checks against the depth
AnimatedRNG f73ba35
Adds multifrustrum support to the GLSL ES 1.00 shaders
AnimatedRNG 10a36b8
Adds parameter tuning for the region growing operator
AnimatedRNG cab3822
Updates sandcastle demo
AnimatedRNG 6ff1427
Formatting fixes
AnimatedRNG 5e31651
Adds WebGL1 support
AnimatedRNG fcb6008
Now updates gl_FragDepthEXT to gl_FragDepth
AnimatedRNG 8c103ae
Point occlusion pass once again ignores invalid fragments
AnimatedRNG 4b57a80
Changes default neighborhood vector size parameter
AnimatedRNG 8a543b0
Adds stencil operations
AnimatedRNG 4d1b88a
Removes console.log() statement
AnimatedRNG b99a67e
Adds WebGL1 support
AnimatedRNG ac12f73
Fixes issues where occluded points would still be copied
AnimatedRNG 75f4bfc
Edge creep filter is based on absolute value ratio; much more effecti…
AnimatedRNG eee584a
Adds back the old edge-creep suppression parameter in conjunction wit…
AnimatedRNG d43fabd
Disables WebGL 2 by default
AnimatedRNG 1c592c1
Point occlusion operator is now stenciled
AnimatedRNG b150472
Adds a new uniform that handles the "clamped" ends of the frustum
AnimatedRNG e142db9
Adds a new uniform that controls point attenuation
AnimatedRNG 348e16c
Point Cloud Processor now modifies the point attenuation property
AnimatedRNG 8c34023
GLSLModernizer is now called by ShaderSource no matter what
AnimatedRNG e0c32d8
Renames the variable "texture" so that it no longer breaks GLSLModern…
AnimatedRNG 40e0fe1
No longer calling GLSLModernizer
AnimatedRNG aa6b828
Removes old console.log statement
AnimatedRNG 2cab742
GLSLModernizer is now only called in WebGL 2 contexts
AnimatedRNG b0e7ba8
Fixes merge conflicts
AnimatedRNG 5c788af
Merge branch 'master' into point-cloud-processor-ss-webgl2
AnimatedRNG 86742db
Disables WebGL 2 by default
AnimatedRNG 8144fe8
Now using church tileset
AnimatedRNG 41b227f
Fixes a problem that arose during merging
AnimatedRNG d998194
Replaces the hacky "replace-all" function in GLSLModernizer with a re…
AnimatedRNG 4f5aeea
Fix for updating the point cloud processor
lilleyse de76157
Fixes find function
AnimatedRNG 9c7bde5
Merge branch 'point-cloud-processor-ss' of github.com:AnimatedRNG/ces…
AnimatedRNG 0d711a4
Renamed frustumClamp to clampedFrustum
AnimatedRNG 64ec737
Fixes Cartesian naming typo
AnimatedRNG d9af53d
Indents <table> tag
AnimatedRNG 7c7c63c
Removes date function
AnimatedRNG 4dbe8de
Removes useless style
AnimatedRNG 4f64445
Removes unnecessary comment
AnimatedRNG 9300fa8
Adds more of the documentation for the parameters into PointCloudPost…
AnimatedRNG 512da5a
Removes defaultValue statements
AnimatedRNG d90233a
Removes some obsolete TODO statements
AnimatedRNG 630c9c2
Now passing the tileset into PointCloudPostProcessor
AnimatedRNG d270f4a
Fixes documentation string on pointAttenuationMaxSize
AnimatedRNG e371e54
Fixes floating point type in GLSL code
AnimatedRNG 4b0e6f3
Combines multiple vertex shader lines into one
AnimatedRNG 83da840
Renames DENSITY_VIEW to densityView and STENCIL_VIEW to stencilView
AnimatedRNG 4f7b73d
Fixes merge conflicts
AnimatedRNG 91bb585
Adds option to enable/disable the triangle wave
AnimatedRNG 0f0cf36
Now rescaling the range parameter before it is passed into the shader
AnimatedRNG 981ebfb
USE_TRIANGLE_WAVE is off by default now
AnimatedRNG 6a38b49
Now using rescaled ray distances
AnimatedRNG 29c1cf8
Blending is now depth-aware
AnimatedRNG a5255a0
Disables point cloud post processing by default
AnimatedRNG c3ffef9
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG dfa8179
Fixes eslint issues in PointCloudPostProcessor
AnimatedRNG 7e012de
Fixes the Cesium3DTileset test by changing the zoom level
AnimatedRNG 28c322e
First PointCloudPostProcessor test
AnimatedRNG 211d687
Creates functions for point array commands
AnimatedRNG b1cc879
Fixes defines
AnimatedRNG 109d111
Fixes variable typo
AnimatedRNG fea418e
Now constructing the point array upon resize
AnimatedRNG 2e8c30b
Adds support for the EXT_blend_minmax extension
AnimatedRNG 6cbb3fb
Adds example for reference
AnimatedRNG bb9bac2
No longer passing v_textureCoordinates around
AnimatedRNG 69d551f
No longer using czm_packDepth and czm_unpackDepth for density
AnimatedRNG f6f4a80
Adds some example code that does a vertex texture fetch
AnimatedRNG e5a91c5
Now replacing constants in example
AnimatedRNG 4f6bc80
Merges in master; includes the new modernizeShader code
AnimatedRNG b1befe8
Merges in point-cloud-processor-ss; includes modernizer fixes
AnimatedRNG 442011e
createPointArrayCommand is a lot easier to use now
AnimatedRNG efa898e
useStencil is actually used now
AnimatedRNG 1039d2c
Adds random uniform to the example
AnimatedRNG 6c642c3
Density estimation now uses the neighbor distribution method; edge cu…
AnimatedRNG f5783a1
Removes cruft
AnimatedRNG 25f838c
Refactor of how commands are stored
AnimatedRNG d7f34c7
Fixes bug where WebGL 1 hardware wouldn't perform an early fragment t…
AnimatedRNG bd01fe5
Renames misleading variable
AnimatedRNG d5768ed
Somewhat functional point occlusion operator
AnimatedRNG 9f38a75
Fixes bug with atan2; ignores optimized version for now
AnimatedRNG bcae5c4
Point occlusion operator now works with point arrays
AnimatedRNG 4fa34a4
Simplifies accumulation
AnimatedRNG b8b1841
Much faster sector lookup
AnimatedRNG 8df82f0
Removes old code
AnimatedRNG 3e5cfaf
Minor optimization with dot product
AnimatedRNG 5076163
Cleans up stencil commands
AnimatedRNG cb8ff59
Consistency fixes for region growing
AnimatedRNG 04bfdd7
Switches the old floating point depth to packed depth
AnimatedRNG 7564194
Now using a proper AO texture
AnimatedRNG 14f3b98
Now clearing AO texture to 1.0 (no occlusion)
AnimatedRNG 411363b
Working AO
AnimatedRNG 8aff6d6
Adds more AO parameters
AnimatedRNG b97bb0d
Adds the old clear commands back in
AnimatedRNG 634d6ff
Adds WebGL 2 support
AnimatedRNG 64ffd5e
Dead code removal
AnimatedRNG 3fe107b
AO no longer breaks density/stencil view
AnimatedRNG 525ae79
Fixes the AO artifacts; bug in czm_packDepth
AnimatedRNG 8132d44
Fixes the WebGL 2 version
AnimatedRNG ad70931
Formatting fixes
AnimatedRNG f50178c
Adds the edge culling filter back in
AnimatedRNG deeee68
Merges with the optimized branch
AnimatedRNG 2918d2e
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG 2fa6bcd
Mostly fixes resizing crash
AnimatedRNG e4bfc90
Removes "resized" debug statement
AnimatedRNG 3db07b2
Sets the region growing range parameter to 0.0 by default
AnimatedRNG c12b289
Merge branch 'master' into point-cloud-processor-ss
AnimatedRNG 68e24d9
PointCloudPostProcessor now stores all the draw commands in a dictionary
AnimatedRNG bd3f598
Disables the filter by default for now
AnimatedRNG 413947c
Removes old comments
AnimatedRNG 485baae
Cleaner UI for sandcastle
AnimatedRNG f63bd40
Fixes AO View option
AnimatedRNG 467108f
Moves PointArrayVS to its own file
AnimatedRNG b93db54
Starting to implement random point reduction
AnimatedRNG 1f12325
Parameters now attached to UI
AnimatedRNG a122a29
Point arrays scale more aggressively now
AnimatedRNG 658a5b4
Adds random reduction for other point array commands
AnimatedRNG 2953087
Typo fix
AnimatedRNG 2f7fab5
Now using the old point occlusion code
AnimatedRNG 06b9883
AO works with the new setup now
AnimatedRNG d05acb3
Resets everything to the old "check the whole neighborhood" technique
AnimatedRNG a0e5639
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG bd10aa8
Now using texelFetch rather than texture for the WebGL 2 point occlus…
AnimatedRNG cc26265
Now using texelFetch(es) in the region growing pass, if we are on Web…
AnimatedRNG e9cc868
Removes more old, unused code
AnimatedRNG fe5b55f
Once again, density estimation only applies to invalid pixels
AnimatedRNG 366cf55
Adds random dropout factor for point occlusion
AnimatedRNG faa7271
Density estimation now uses the new dropout factor
AnimatedRNG cf20cc4
Changes dropout so that it works a lot more like the old reduction fa…
AnimatedRNG 297fb9f
Delay parameter is now configurable
AnimatedRNG b00501f
Sigmoid function is now much simpler
AnimatedRNG 371aaea
Sigmoid function rename
AnimatedRNG f47da9e
Updates the doc comment on the point cloud post processor
AnimatedRNG 152f046
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG c78b3a3
Renames the aoStage to debugViewStage
AnimatedRNG 411c08f
Adds in depth view
AnimatedRNG cdc5ecc
Changes the triangle wave period to a more reasonable value
AnimatedRNG 508e69b
Merge branch 'point-cloud-processor-ss' of github.com:AnimatedRNG/ces…
AnimatedRNG 02998ef
Adds documentation for the depth view
AnimatedRNG d96632d
Fixes a bug with rescaled ray depth
AnimatedRNG 74dcc29
Fixes bug where eye-space coordinates weren't homogeneous
AnimatedRNG 48119a5
Moves blending to its own file
AnimatedRNG 21f3e23
Now using Uber's FP64 primitives for depth in the blending shader
AnimatedRNG ca0870b
Fixes the triangle wave mode
AnimatedRNG 9fa77dd
Temporarily disables blending
AnimatedRNG 30d99c3
No longer using ray distances; eye-space coordinates used everywhere
AnimatedRNG b2d6520
Merge remote-tracking branch 'upstream' into point-cloud-processor-ss
AnimatedRNG a7c93ae
Fixes packed/unpacked modes for debug view
AnimatedRNG 1820dc2
Performance improvements for the WebGL 1 shader
AnimatedRNG f7ff5bd
Performance fixes for the WebGL 2 shader too
AnimatedRNG 84e0bf7
Fixes AO view
AnimatedRNG f690632
Removes Uber's FP64 code
AnimatedRNG a58a50c
Removes deck.gl from LICENSE.md
AnimatedRNG fa16230
Removes EdgeCullingPass.glsl
AnimatedRNG 8f8f851
Moves enabled check out of PointCloudPostProcessor
AnimatedRNG c430bd9
Style fixes for point cloud attenuation options and position_absolute
AnimatedRNG 2f3fefd
Merge branch 'point-cloud-processor-ss' of github.com:AnimatedRNG/ces…
AnimatedRNG 25c8c7e
Now destroying the PointCloudPostProcessor when necessary
AnimatedRNG 24ecf21
Removes old, unused code
AnimatedRNG 5602727
Moves inner functions out
AnimatedRNG 527b703
Depth texture array now the right length
AnimatedRNG 0f11323
Now creates sector LUT without copying
AnimatedRNG 4236971
Renames dirty texture
AnimatedRNG c365313
Colon consistency
AnimatedRNG aeeb27f
Renames ecTexture and depthTexture
AnimatedRNG 2c35e2e
Renames most of the variables in the shaders to EC rather than depth
AnimatedRNG 92f9c63
Fixes the WebGL2 region growing pass
AnimatedRNG 298efe4
Merge branch 'master' of github.com:AnalyticalGraphicsInc/cesium into…
AnimatedRNG ab114ae
Removes old TODO
AnimatedRNG 091af74
Prefixes all the uniforms with a u_
AnimatedRNG 81baa50
Removes uniform from other branch
AnimatedRNG f4bef24
Replaces Str with FS
AnimatedRNG cecc9d0
Removes most of the epsilon(s) in the code
AnimatedRNG bcba5f3
Simplifies createResources logic
AnimatedRNG 2980ba6
More accurate processingSupported function
AnimatedRNG b60d6b3
Using dot notation for the clearCommands now
AnimatedRNG c7a431b
Inherits destroyed/isDestroyed documentation
AnimatedRNG 08f5cc1
Now adhering to the GLSL coding convention
AnimatedRNG e421edc
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG d544e2e
Renames all the uniforms so that they have a "u_"
AnimatedRNG 25843df
Replaced splice with unshift
AnimatedRNG 4ed1654
Removes useless code/comments
AnimatedRNG 96a3efd
Now cloning UniformMap and RenderState
AnimatedRNG 0d69750
Now using the combine() function
AnimatedRNG e65689a
Removes pi defines from shader file
AnimatedRNG e08fa64
Removes empty line
AnimatedRNG fbb8ba1
Removes the morphTo3D call
AnimatedRNG 297c1ca
Removes files from spec
AnimatedRNG 81243b3
Removes TODOs
AnimatedRNG 5e6ad06
Destroy method now destroys the processor
AnimatedRNG 255216e
Adds method documentation for the PointCloudPostProcessor
AnimatedRNG a5b474e
Removes old comment
AnimatedRNG 1503713
Formatting changes
AnimatedRNG 05a3cda
All the defines are now added at runtime
AnimatedRNG d46ebb4
Removes unnecessary line
AnimatedRNG 0cc0aaa
Style fixes
AnimatedRNG 9da4c9e
Fixes sectors array iteration
AnimatedRNG a95f9ca
Render state now created from cache
AnimatedRNG 3dc4d2f
Renames AOView to aoView
AnimatedRNG 8c3439a
Renames one occurrence of position_absolute to positionWC
AnimatedRNG 0923e73
Fixes change that broke density view
AnimatedRNG 0deb547
Adds a new edge culling metric -- distanceConstraint
AnimatedRNG b3df085
Clone fixes
AnimatedRNG 0fbdb39
Tests should hopefully no longer break CI
AnimatedRNG 4b1a918
Tests longer assume that pointCloudPostProcessor has been created
AnimatedRNG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
236 changes: 236 additions & 0 deletions
236
Apps/Sandcastle/gallery/3D Tiles Point Cloud Post Processing.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,236 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <!-- Use Chrome Frame in IE --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
<meta name="description" content="Point occlusion and region growing example."> | ||
<meta name="cesium-sandcastle-labels" content="3D Tiles"> | ||
<title>Cesium Demo</title> | ||
<script type="text/javascript" src="../Sandcastle-header.js"></script> | ||
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script> | ||
<script type="text/javascript"> | ||
require.config({ | ||
baseUrl : '../../../Source', | ||
waitSeconds : 60 | ||
}); | ||
</script> | ||
</head> | ||
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html"> | ||
<style> | ||
@import url(../templates/bucket.css); | ||
#toolbar button { display: block; } | ||
</style> | ||
<div id="cesiumContainer" class="fullSize"></div> | ||
<div id="loadingOverlay"><h1>Loading...</h1></div> | ||
<div id="toolbar"> | ||
<table> | ||
<tbody> | ||
<tr> | ||
<td>Occlusion Angle</td> | ||
<td> | ||
<input type="range" min="-1" max="1" step="0.05" data-bind="value: occlusionAngle, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: occlusionAngle"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Point Occlusion Filter Size</td> | ||
<td> | ||
<input type="range" min="0" max="4" step="1" data-bind="value: neighborhoodHalfWidth, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: neighborhoodHalfWidth"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Maximum Region Growing Iterations</td> | ||
<td> | ||
<input type="range" min="0" max="10" step="1" data-bind="value: numRegionGrowingPasses, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: numRegionGrowingPasses"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Region Growing Range Parameter</td> | ||
<td> | ||
<input type="range" min="0" max="1" step="1e-41" data-bind="value: rangeParameter, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: rangeParameter"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Maximum Neighborhood Vector Size</td> | ||
<td> | ||
<input type="range" min="0.0" max="200.0" step="1e-2" data-bind="value: neighborhoodVectorSize, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: neighborhoodVectorSize"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Max Neighborhood ABS ratio</td> | ||
<td> | ||
<input type="range" min="0.0" max="1.0" step="1e-2" data-bind="value: maxAbsRatio, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: maxAbsRatio"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Point Attenuation Multiplier</td> | ||
<td> | ||
<input type="range" min="1.0" max="10.0" step="1" data-bind="value: pointAttenuationMultiplier, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: pointAttenuationMultiplier"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>AO Sigmoid Domain Offset</td> | ||
<td> | ||
<input type="range" min="0.0" max="1.0" step="0.01" data-bind="value: sigmoidDomainOffset, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: sigmoidDomainOffset"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>AO Sigmoid Sharpness</td> | ||
<td> | ||
<input type="range" min="0.0" max="1.0" step="0.01" data-bind="value: sigmoidSharpness, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: sigmoidSharpness"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Dropout Factor</td> | ||
<td> | ||
<input type="range" min="0.0" max="1.0" step="0.01" data-bind="value: dropoutFactor, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: dropoutFactor"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Delay</td> | ||
<td> | ||
<input type="range" min="0" max="4" step="1" data-bind="value: delay, valueUpdate: 'input'"> | ||
<input type="text" size="2" data-bind="value: delay"> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<script id="cesium_sandcastle_script"> | ||
function startup(Cesium) { | ||
'use strict'; | ||
//Sandcastle_Begin | ||
|
||
var viewer = new Cesium.Viewer('cesiumContainer'); | ||
viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin); | ||
var inspectorViewModel = viewer.cesium3DTilesInspector.viewModel; | ||
inspectorViewModel.picking = false; | ||
|
||
var scene = viewer.scene; | ||
var url = 'https://beta.cesium.com/api/assets/1460?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMzk2YzJiOS1jZGFmLTRlZmYtYmQ4MS00NTA3NjEwMzViZTkiLCJpZCI6NDQsImFzc2V0cyI6WzE0NjBdLCJpYXQiOjE0OTkyNjQ3NTV9.oWjvN52CRQ-dk3xtvD4e8ZnOHZhoWSpJLlw115mbQJM'; | ||
var tileset = scene.primitives.add(new Cesium.Cesium3DTileset({ | ||
url : url | ||
})); | ||
tileset.pointCloudPostProcessorOptions.enabled = false; | ||
inspectorViewModel.tileset = tileset; | ||
|
||
tileset.readyPromise.then(function() { | ||
var boundingSphere = tileset.boundingSphere; | ||
viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0.0, -1.0, 50.0)); | ||
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY); | ||
}); | ||
|
||
var viewModel = { | ||
occlusionAngle : tileset.pointCloudPostProcessorOptions.occlusionAngle, | ||
rangeParameter : tileset.pointCloudPostProcessorOptions.rangeParameter, | ||
numRegionGrowingPasses : tileset.pointCloudPostProcessorOptions.numRegionGrowingPasses, | ||
neighborhoodHalfWidth : tileset.pointCloudPostProcessorOptions.neighborhoodHalfWidth, | ||
neighborhoodVectorSize : tileset.pointCloudPostProcessorOptions.neighborhoodVectorSize, | ||
maxAbsRatio : tileset.pointCloudPostProcessorOptions.maxAbsRatio, | ||
pointAttenuationMultiplier : tileset.pointCloudPostProcessorOptions.pointAttenuationMultiplier, | ||
sigmoidDomainOffset : tileset.pointCloudPostProcessorOptions.sigmoidDomainOffset, | ||
sigmoidSharpness : tileset.pointCloudPostProcessorOptions.sigmoidSharpness, | ||
dropoutFactor : tileset.pointCloudPostProcessorOptions.dropoutFactor, | ||
delay : tileset.pointCloudPostProcessorOptions.delay | ||
}; | ||
Cesium.knockout.track(viewModel); | ||
|
||
var toolbar = document.getElementById('toolbar'); | ||
Cesium.knockout.applyBindings(viewModel, toolbar); | ||
|
||
function subscribeParameter(name) { | ||
Cesium.knockout.getObservable(viewModel, name).subscribe( | ||
function(newValue) { | ||
viewModel[name] = newValue; | ||
tileset.pointCloudPostProcessorOptions[name] = newValue; | ||
} | ||
); | ||
} | ||
|
||
subscribeParameter('occlusionAngle'); | ||
subscribeParameter('rangeParameter'); | ||
subscribeParameter('neighborhoodHalfWidth'); | ||
subscribeParameter('numRegionGrowingPasses'); | ||
subscribeParameter('neighborhoodVectorSize'); | ||
subscribeParameter('maxAbsRatio'); | ||
subscribeParameter('pointAttenuationMultiplier'); | ||
subscribeParameter('sigmoidDomainOffset'); | ||
subscribeParameter('sigmoidSharpness'); | ||
subscribeParameter('dropoutFactor'); | ||
subscribeParameter('delay'); | ||
|
||
Sandcastle.addToggleButton('Enabled', false, function(checked) { | ||
tileset.pointCloudPostProcessorOptions.enabled = checked; | ||
}); | ||
|
||
Sandcastle.addToggleButton('Use Triangle Wave', false, function(checked) { | ||
tileset.pointCloudPostProcessorOptions.useTriangle = checked; | ||
}); | ||
|
||
Sandcastle.addToggleButton('Enable AO', true, function(checked) { | ||
tileset.pointCloudPostProcessorOptions.enableAO = checked; | ||
}); | ||
|
||
Sandcastle.addToolbarMenu([{ | ||
text : 'Color View', | ||
onselect : function() { | ||
tileset.pointCloudPostProcessorOptions.depthViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.densityViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.stencilViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.AOViewEnabled = false; | ||
} | ||
}, { | ||
text : 'Depth View', | ||
onselect : function() { | ||
tileset.pointCloudPostProcessorOptions.depthViewEnabled = true; | ||
tileset.pointCloudPostProcessorOptions.densityViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.stencilViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.AOViewEnabled = false; | ||
} | ||
}, { | ||
text : 'Density View', | ||
onselect : function() { | ||
tileset.pointCloudPostProcessorOptions.depthViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.densityViewEnabled = true; | ||
tileset.pointCloudPostProcessorOptions.stencilViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.AOViewEnabled = false; | ||
} | ||
}, { | ||
text : 'Stencil View', | ||
onselect : function() { | ||
tileset.pointCloudPostProcessorOptions.depthViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.densityViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.stencilViewEnabled = true; | ||
tileset.pointCloudPostProcessorOptions.AOViewEnabled = false; | ||
} | ||
}, { | ||
text : 'AO View', | ||
onselect : function() { | ||
tileset.pointCloudPostProcessorOptions.depthViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.densityViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.stencilViewEnabled = false; | ||
tileset.pointCloudPostProcessorOptions.AOViewEnabled = true; | ||
} | ||
}]); | ||
|
||
//Sandcastle_End | ||
Sandcastle.finishedLoading(); | ||
} | ||
if (typeof Cesium !== "undefined") { | ||
startup(Cesium); | ||
} else if (typeof require === "function") { | ||
require(["Cesium"], startup); | ||
} | ||
</script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -672,6 +672,28 @@ https://github.com/KhronosGroup/glTF-WebGL-PBR | |
>CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | ||
>OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
### deck.gl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a link to the repo and use quoted text for the license text, similar to the others. |
||
|
||
Copyright (c) 2015 - 2017 Uber Technologies, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
Tests | ||
===== | ||
|
||
|
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point occlusion shader uses 64-bit primitives internally if the USE_TRIANGLE flag is enabled