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

More robust point cloud post processor #5455

Merged
Merged
Show file tree
Hide file tree
Changes from all 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 Jun 19, 2017
8268a56
Not-so-functional existing (non-derived) post-processing framework
AnimatedRNG Jun 19, 2017
86fac01
Adds new derived command code
AnimatedRNG Jun 19, 2017
cef8a2a
Clearing the framebuffers now happens in the correct order -- nothing…
AnimatedRNG Jun 19, 2017
8e2d7ca
Now properly hands off data between stages
AnimatedRNG Jun 19, 2017
7f4827b
Now correctly currying depth
AnimatedRNG Jun 20, 2017
4adc68c
Temporarily reducing the number of frustra so that the depth values d…
AnimatedRNG Jun 20, 2017
32810ec
Moves shaders into their own files
AnimatedRNG Jun 20, 2017
9394cca
Working point occlusion filter
AnimatedRNG Jun 20, 2017
f77cb8b
Fixes resizing/destroy issues and takes options now
AnimatedRNG Jun 21, 2017
3c9bf84
Now drawing color point cloud
AnimatedRNG Jun 21, 2017
d36c8ff
Adds enabled property
AnimatedRNG Jun 21, 2017
b5fd034
Adds new Sandcastle demo for point cloud post processing
AnimatedRNG Jun 21, 2017
303ad68
Sandcastle demo now includes even more options
AnimatedRNG Jun 22, 2017
197b54c
Adds region growing pass
AnimatedRNG Jun 22, 2017
3db0993
Adds more configurable parameters to PointCloudPostProcessor
AnimatedRNG Jun 22, 2017
449f325
Fixes bug where additional region growing passes didn't grow empty areas
AnimatedRNG Jun 22, 2017
ce5bf10
More sane parameter for the number of region growing passes
AnimatedRNG Jun 22, 2017
2520c89
Some code cleanup in the region growing filter
AnimatedRNG Jun 22, 2017
8331358
Sector histogram modification has better branching now
AnimatedRNG Jun 23, 2017
c22a98e
Better inverse trig
AnimatedRNG Jun 23, 2017
6930938
Some code cleanup and branch optimization
AnimatedRNG Jun 23, 2017
03f2266
Updates capability flags for WebGL 2
AnimatedRNG Jun 27, 2017
d6b1869
Newline after version in ShaderSource
AnimatedRNG Jun 27, 2017
5862b6b
Updates pointcloud processor to WebGL 2.0
AnimatedRNG Jun 27, 2017
37cef07
Adds support for the EXT_color_buffer_float extension
AnimatedRNG Jun 28, 2017
e9855c0
Moves GLSLModernizer to its own file
AnimatedRNG Jun 28, 2017
4e9ad17
Fixes issues where glslModernize does not add a semicolon when updati…
AnimatedRNG Jun 28, 2017
1925164
Refactors GLSLModernizer
AnimatedRNG Jun 28, 2017
1196a06
Another refactor of GLSLModernizer -- now supports cleaning up Shader…
AnimatedRNG Jun 28, 2017
99304d1
Modifies PointCloudPostProcessor so that it now uses the new GLSLMode…
AnimatedRNG Jun 28, 2017
af64702
Uses the correct internal format for floating point RGBA textures in …
AnimatedRNG Jun 28, 2017
915442c
GLSLModernizer is now preprocessor-branch aware
AnimatedRNG Jun 28, 2017
c2cea47
Adds GLSLModernizer calls to OIT
AnimatedRNG Jun 28, 2017
5e66040
GLSLModernizer now ignores shaders that are already written in GLSL E…
AnimatedRNG Jun 28, 2017
5562f24
Adds WebGL 2 checks
AnimatedRNG Jun 29, 2017
a1db0a3
PointCloudPostProcessor now loads different shaders depending on the …
AnimatedRNG Jun 29, 2017
1c0f9ed
PointOcclusionPass now takes advantage of non-constant array indexing
AnimatedRNG Jun 29, 2017
33e6809
Starts the transition over the multifrustrum support
AnimatedRNG Jun 29, 2017
6ae66d2
Point occlusion operator now writes depth to a color attachment
AnimatedRNG Jun 29, 2017
636a423
Adjusts defaults for the region growing parameter
AnimatedRNG Jun 29, 2017
3666593
Removes unnecessary write
AnimatedRNG Jun 29, 2017
dcaafaf
Fixes the GLSL ES 1.00 shaders
AnimatedRNG Jun 29, 2017
f81d356
Code review fixes
AnimatedRNG Jun 29, 2017
92c0422
Adds distance-based depth and triangle wave method
AnimatedRNG Jun 30, 2017
2a8e842
Adds abs() calls for checks against the depth
AnimatedRNG Jun 30, 2017
f73ba35
Adds multifrustrum support to the GLSL ES 1.00 shaders
AnimatedRNG Jun 30, 2017
10a36b8
Adds parameter tuning for the region growing operator
AnimatedRNG Jul 6, 2017
cab3822
Updates sandcastle demo
AnimatedRNG Jul 6, 2017
6ff1427
Formatting fixes
AnimatedRNG Jul 6, 2017
5e31651
Adds WebGL1 support
AnimatedRNG Jul 6, 2017
fcb6008
Now updates gl_FragDepthEXT to gl_FragDepth
AnimatedRNG Jul 6, 2017
8c103ae
Point occlusion pass once again ignores invalid fragments
AnimatedRNG Jul 6, 2017
4b57a80
Changes default neighborhood vector size parameter
AnimatedRNG Jul 6, 2017
8a543b0
Adds stencil operations
AnimatedRNG Jul 7, 2017
4d1b88a
Removes console.log() statement
AnimatedRNG Jul 7, 2017
b99a67e
Adds WebGL1 support
AnimatedRNG Jul 7, 2017
ac12f73
Fixes issues where occluded points would still be copied
AnimatedRNG Jul 7, 2017
75f4bfc
Edge creep filter is based on absolute value ratio; much more effecti…
AnimatedRNG Jul 7, 2017
eee584a
Adds back the old edge-creep suppression parameter in conjunction wit…
AnimatedRNG Jul 7, 2017
d43fabd
Disables WebGL 2 by default
AnimatedRNG Jun 29, 2017
1c592c1
Point occlusion operator is now stenciled
AnimatedRNG Jul 10, 2017
b150472
Adds a new uniform that handles the "clamped" ends of the frustum
AnimatedRNG Jul 10, 2017
e142db9
Adds a new uniform that controls point attenuation
AnimatedRNG Jul 10, 2017
348e16c
Point Cloud Processor now modifies the point attenuation property
AnimatedRNG Jul 10, 2017
8c34023
GLSLModernizer is now called by ShaderSource no matter what
AnimatedRNG Jul 11, 2017
e0c32d8
Renames the variable "texture" so that it no longer breaks GLSLModern…
AnimatedRNG Jul 11, 2017
40e0fe1
No longer calling GLSLModernizer
AnimatedRNG Jul 11, 2017
aa6b828
Removes old console.log statement
AnimatedRNG Jul 11, 2017
2cab742
GLSLModernizer is now only called in WebGL 2 contexts
AnimatedRNG Jul 11, 2017
b0e7ba8
Fixes merge conflicts
AnimatedRNG Jul 11, 2017
5c788af
Merge branch 'master' into point-cloud-processor-ss-webgl2
AnimatedRNG Jul 11, 2017
86742db
Disables WebGL 2 by default
AnimatedRNG Jun 29, 2017
8144fe8
Now using church tileset
AnimatedRNG Jul 11, 2017
41b227f
Fixes a problem that arose during merging
AnimatedRNG Jul 11, 2017
d998194
Replaces the hacky "replace-all" function in GLSLModernizer with a re…
AnimatedRNG Jul 12, 2017
4f5aeea
Fix for updating the point cloud processor
lilleyse Jul 12, 2017
de76157
Fixes find function
AnimatedRNG Jul 12, 2017
9c7bde5
Merge branch 'point-cloud-processor-ss' of github.com:AnimatedRNG/ces…
AnimatedRNG Jul 12, 2017
0d711a4
Renamed frustumClamp to clampedFrustum
AnimatedRNG Jul 12, 2017
64ec737
Fixes Cartesian naming typo
AnimatedRNG Jul 12, 2017
d9af53d
Indents <table> tag
AnimatedRNG Jul 12, 2017
7c7c63c
Removes date function
AnimatedRNG Jul 12, 2017
4dbe8de
Removes useless style
AnimatedRNG Jul 12, 2017
4f64445
Removes unnecessary comment
AnimatedRNG Jul 12, 2017
9300fa8
Adds more of the documentation for the parameters into PointCloudPost…
AnimatedRNG Jul 12, 2017
512da5a
Removes defaultValue statements
AnimatedRNG Jul 12, 2017
d90233a
Removes some obsolete TODO statements
AnimatedRNG Jul 12, 2017
630c9c2
Now passing the tileset into PointCloudPostProcessor
AnimatedRNG Jul 12, 2017
d270f4a
Fixes documentation string on pointAttenuationMaxSize
AnimatedRNG Jul 12, 2017
e371e54
Fixes floating point type in GLSL code
AnimatedRNG Jul 12, 2017
4b0e6f3
Combines multiple vertex shader lines into one
AnimatedRNG Jul 12, 2017
83da840
Renames DENSITY_VIEW to densityView and STENCIL_VIEW to stencilView
AnimatedRNG Jul 12, 2017
4f7b73d
Fixes merge conflicts
AnimatedRNG Jul 12, 2017
91bb585
Adds option to enable/disable the triangle wave
AnimatedRNG Jul 14, 2017
0f0cf36
Now rescaling the range parameter before it is passed into the shader
AnimatedRNG Jul 14, 2017
981ebfb
USE_TRIANGLE_WAVE is off by default now
AnimatedRNG Jul 14, 2017
6a38b49
Now using rescaled ray distances
AnimatedRNG Jul 14, 2017
29c1cf8
Blending is now depth-aware
AnimatedRNG Jul 14, 2017
a5255a0
Disables point cloud post processing by default
AnimatedRNG Jul 17, 2017
c3ffef9
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG Jul 17, 2017
dfa8179
Fixes eslint issues in PointCloudPostProcessor
AnimatedRNG Jul 17, 2017
7e012de
Fixes the Cesium3DTileset test by changing the zoom level
AnimatedRNG Jul 17, 2017
28c322e
First PointCloudPostProcessor test
AnimatedRNG Jul 17, 2017
211d687
Creates functions for point array commands
AnimatedRNG Jul 18, 2017
b1cc879
Fixes defines
AnimatedRNG Jul 18, 2017
109d111
Fixes variable typo
AnimatedRNG Jul 18, 2017
fea418e
Now constructing the point array upon resize
AnimatedRNG Jul 18, 2017
2e8c30b
Adds support for the EXT_blend_minmax extension
AnimatedRNG Jul 18, 2017
6cbb3fb
Adds example for reference
AnimatedRNG Jul 18, 2017
bb9bac2
No longer passing v_textureCoordinates around
AnimatedRNG Jul 18, 2017
69d551f
No longer using czm_packDepth and czm_unpackDepth for density
AnimatedRNG Jul 18, 2017
f6f4a80
Adds some example code that does a vertex texture fetch
AnimatedRNG Jul 18, 2017
e5a91c5
Now replacing constants in example
AnimatedRNG Jul 19, 2017
4f6bc80
Merges in master; includes the new modernizeShader code
AnimatedRNG Jul 19, 2017
b1befe8
Merges in point-cloud-processor-ss; includes modernizer fixes
AnimatedRNG Jul 19, 2017
442011e
createPointArrayCommand is a lot easier to use now
AnimatedRNG Jul 19, 2017
efa898e
useStencil is actually used now
AnimatedRNG Jul 19, 2017
1039d2c
Adds random uniform to the example
AnimatedRNG Jul 19, 2017
6c642c3
Density estimation now uses the neighbor distribution method; edge cu…
AnimatedRNG Jul 19, 2017
f5783a1
Removes cruft
AnimatedRNG Jul 19, 2017
25f838c
Refactor of how commands are stored
AnimatedRNG Jul 19, 2017
d7f34c7
Fixes bug where WebGL 1 hardware wouldn't perform an early fragment t…
AnimatedRNG Jul 19, 2017
bd01fe5
Renames misleading variable
AnimatedRNG Jul 19, 2017
d5768ed
Somewhat functional point occlusion operator
AnimatedRNG Jul 19, 2017
9f38a75
Fixes bug with atan2; ignores optimized version for now
AnimatedRNG Jul 20, 2017
bcae5c4
Point occlusion operator now works with point arrays
AnimatedRNG Jul 20, 2017
4fa34a4
Simplifies accumulation
AnimatedRNG Jul 20, 2017
b8b1841
Much faster sector lookup
AnimatedRNG Jul 21, 2017
8df82f0
Removes old code
AnimatedRNG Jul 21, 2017
3e5cfaf
Minor optimization with dot product
AnimatedRNG Jul 21, 2017
5076163
Cleans up stencil commands
AnimatedRNG Jul 21, 2017
cb8ff59
Consistency fixes for region growing
AnimatedRNG Jul 21, 2017
04bfdd7
Switches the old floating point depth to packed depth
AnimatedRNG Jul 21, 2017
7564194
Now using a proper AO texture
AnimatedRNG Jul 21, 2017
14f3b98
Now clearing AO texture to 1.0 (no occlusion)
AnimatedRNG Jul 21, 2017
411363b
Working AO
AnimatedRNG Jul 24, 2017
8aff6d6
Adds more AO parameters
AnimatedRNG Jul 24, 2017
b97bb0d
Adds the old clear commands back in
AnimatedRNG Jul 24, 2017
634d6ff
Adds WebGL 2 support
AnimatedRNG Jul 24, 2017
64ffd5e
Dead code removal
AnimatedRNG Jul 24, 2017
3fe107b
AO no longer breaks density/stencil view
AnimatedRNG Jul 24, 2017
525ae79
Fixes the AO artifacts; bug in czm_packDepth
AnimatedRNG Jul 24, 2017
8132d44
Fixes the WebGL 2 version
AnimatedRNG Jul 24, 2017
ad70931
Formatting fixes
AnimatedRNG Jul 25, 2017
f50178c
Adds the edge culling filter back in
AnimatedRNG Jul 25, 2017
deeee68
Merges with the optimized branch
AnimatedRNG Jul 25, 2017
2918d2e
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG Jul 25, 2017
2fa6bcd
Mostly fixes resizing crash
AnimatedRNG Jul 25, 2017
e4bfc90
Removes "resized" debug statement
AnimatedRNG Jul 25, 2017
3db07b2
Sets the region growing range parameter to 0.0 by default
AnimatedRNG Jul 25, 2017
c12b289
Merge branch 'master' into point-cloud-processor-ss
AnimatedRNG Jul 26, 2017
68e24d9
PointCloudPostProcessor now stores all the draw commands in a dictionary
AnimatedRNG Jul 26, 2017
bd3f598
Disables the filter by default for now
AnimatedRNG Jul 26, 2017
413947c
Removes old comments
AnimatedRNG Jul 26, 2017
485baae
Cleaner UI for sandcastle
AnimatedRNG Jul 27, 2017
f63bd40
Fixes AO View option
AnimatedRNG Jul 27, 2017
467108f
Moves PointArrayVS to its own file
AnimatedRNG Jul 27, 2017
b93db54
Starting to implement random point reduction
AnimatedRNG Jul 27, 2017
1f12325
Parameters now attached to UI
AnimatedRNG Jul 27, 2017
a122a29
Point arrays scale more aggressively now
AnimatedRNG Jul 27, 2017
658a5b4
Adds random reduction for other point array commands
AnimatedRNG Jul 27, 2017
2953087
Typo fix
AnimatedRNG Jul 27, 2017
2f7fab5
Now using the old point occlusion code
AnimatedRNG Jul 28, 2017
06b9883
AO works with the new setup now
AnimatedRNG Jul 28, 2017
d05acb3
Resets everything to the old "check the whole neighborhood" technique
AnimatedRNG Jul 28, 2017
a0e5639
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG Jul 28, 2017
bd10aa8
Now using texelFetch rather than texture for the WebGL 2 point occlus…
AnimatedRNG Jul 28, 2017
cc26265
Now using texelFetch(es) in the region growing pass, if we are on Web…
AnimatedRNG Jul 28, 2017
e9cc868
Removes more old, unused code
AnimatedRNG Jul 28, 2017
fe5b55f
Once again, density estimation only applies to invalid pixels
AnimatedRNG Jul 31, 2017
366cf55
Adds random dropout factor for point occlusion
AnimatedRNG Jul 31, 2017
faa7271
Density estimation now uses the new dropout factor
AnimatedRNG Jul 31, 2017
cf20cc4
Changes dropout so that it works a lot more like the old reduction fa…
AnimatedRNG Jul 31, 2017
297fb9f
Delay parameter is now configurable
AnimatedRNG Aug 1, 2017
b00501f
Sigmoid function is now much simpler
AnimatedRNG Aug 2, 2017
371aaea
Sigmoid function rename
AnimatedRNG Aug 2, 2017
f47da9e
Updates the doc comment on the point cloud post processor
AnimatedRNG Aug 2, 2017
152f046
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG Aug 2, 2017
c78b3a3
Renames the aoStage to debugViewStage
AnimatedRNG Aug 2, 2017
411c08f
Adds in depth view
AnimatedRNG Aug 2, 2017
cdc5ecc
Changes the triangle wave period to a more reasonable value
AnimatedRNG Aug 3, 2017
508e69b
Merge branch 'point-cloud-processor-ss' of github.com:AnimatedRNG/ces…
AnimatedRNG Aug 3, 2017
02998ef
Adds documentation for the depth view
AnimatedRNG Aug 4, 2017
d96632d
Fixes a bug with rescaled ray depth
AnimatedRNG Aug 4, 2017
74dcc29
Fixes bug where eye-space coordinates weren't homogeneous
AnimatedRNG Aug 4, 2017
48119a5
Moves blending to its own file
AnimatedRNG Aug 4, 2017
21f3e23
Now using Uber's FP64 primitives for depth in the blending shader
AnimatedRNG Aug 4, 2017
ca0870b
Fixes the triangle wave mode
AnimatedRNG Aug 4, 2017
9fa77dd
Temporarily disables blending
AnimatedRNG Aug 5, 2017
30d99c3
No longer using ray distances; eye-space coordinates used everywhere
AnimatedRNG Aug 7, 2017
b2d6520
Merge remote-tracking branch 'upstream' into point-cloud-processor-ss
AnimatedRNG Aug 7, 2017
a7c93ae
Fixes packed/unpacked modes for debug view
AnimatedRNG Aug 7, 2017
1820dc2
Performance improvements for the WebGL 1 shader
AnimatedRNG Aug 8, 2017
f7ff5bd
Performance fixes for the WebGL 2 shader too
AnimatedRNG Aug 8, 2017
84e0bf7
Fixes AO view
AnimatedRNG Aug 9, 2017
f690632
Removes Uber's FP64 code
AnimatedRNG Aug 9, 2017
a58a50c
Removes deck.gl from LICENSE.md
AnimatedRNG Aug 9, 2017
fa16230
Removes EdgeCullingPass.glsl
AnimatedRNG Aug 10, 2017
8f8f851
Moves enabled check out of PointCloudPostProcessor
AnimatedRNG Aug 10, 2017
c430bd9
Style fixes for point cloud attenuation options and position_absolute
AnimatedRNG Aug 10, 2017
2f3fefd
Merge branch 'point-cloud-processor-ss' of github.com:AnimatedRNG/ces…
AnimatedRNG Aug 23, 2017
25c8c7e
Now destroying the PointCloudPostProcessor when necessary
AnimatedRNG Aug 23, 2017
24ecf21
Removes old, unused code
AnimatedRNG Aug 23, 2017
5602727
Moves inner functions out
AnimatedRNG Aug 23, 2017
527b703
Depth texture array now the right length
AnimatedRNG Aug 23, 2017
0f11323
Now creates sector LUT without copying
AnimatedRNG Aug 23, 2017
4236971
Renames dirty texture
AnimatedRNG Aug 23, 2017
c365313
Colon consistency
AnimatedRNG Aug 23, 2017
aeeb27f
Renames ecTexture and depthTexture
AnimatedRNG Aug 27, 2017
2c35e2e
Renames most of the variables in the shaders to EC rather than depth
AnimatedRNG Aug 27, 2017
92f9c63
Fixes the WebGL2 region growing pass
AnimatedRNG Aug 27, 2017
298efe4
Merge branch 'master' of github.com:AnalyticalGraphicsInc/cesium into…
AnimatedRNG Aug 27, 2017
ab114ae
Removes old TODO
AnimatedRNG Aug 27, 2017
091af74
Prefixes all the uniforms with a u_
AnimatedRNG Aug 27, 2017
81baa50
Removes uniform from other branch
AnimatedRNG Aug 27, 2017
f4bef24
Replaces Str with FS
AnimatedRNG Aug 27, 2017
cecc9d0
Removes most of the epsilon(s) in the code
AnimatedRNG Aug 27, 2017
bcba5f3
Simplifies createResources logic
AnimatedRNG Aug 27, 2017
2980ba6
More accurate processingSupported function
AnimatedRNG Aug 27, 2017
b60d6b3
Using dot notation for the clearCommands now
AnimatedRNG Aug 31, 2017
c7a431b
Inherits destroyed/isDestroyed documentation
AnimatedRNG Aug 31, 2017
08f5cc1
Now adhering to the GLSL coding convention
AnimatedRNG Aug 31, 2017
e421edc
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG Sep 3, 2017
d544e2e
Renames all the uniforms so that they have a "u_"
AnimatedRNG Sep 3, 2017
25843df
Replaced splice with unshift
AnimatedRNG Sep 5, 2017
4ed1654
Removes useless code/comments
AnimatedRNG Sep 5, 2017
96a3efd
Now cloning UniformMap and RenderState
AnimatedRNG Sep 5, 2017
0d69750
Now using the combine() function
AnimatedRNG Sep 5, 2017
e65689a
Removes pi defines from shader file
AnimatedRNG Sep 5, 2017
e08fa64
Removes empty line
AnimatedRNG Sep 5, 2017
fbb8ba1
Removes the morphTo3D call
AnimatedRNG Sep 5, 2017
297c1ca
Removes files from spec
AnimatedRNG Sep 5, 2017
81243b3
Removes TODOs
AnimatedRNG Sep 5, 2017
5e6ad06
Destroy method now destroys the processor
AnimatedRNG Sep 5, 2017
255216e
Adds method documentation for the PointCloudPostProcessor
AnimatedRNG Sep 5, 2017
a5b474e
Removes old comment
AnimatedRNG Sep 5, 2017
1503713
Formatting changes
AnimatedRNG Sep 5, 2017
05a3cda
All the defines are now added at runtime
AnimatedRNG Sep 13, 2017
d46ebb4
Removes unnecessary line
AnimatedRNG Sep 13, 2017
0cc0aaa
Style fixes
AnimatedRNG Sep 13, 2017
9da4c9e
Fixes sectors array iteration
AnimatedRNG Sep 13, 2017
a95f9ca
Render state now created from cache
AnimatedRNG Sep 13, 2017
3dc4d2f
Renames AOView to aoView
AnimatedRNG Sep 13, 2017
8c3439a
Renames one occurrence of position_absolute to positionWC
AnimatedRNG Sep 13, 2017
0923e73
Fixes change that broke density view
AnimatedRNG Sep 18, 2017
0deb547
Adds a new edge culling metric -- distanceConstraint
AnimatedRNG Sep 18, 2017
b3df085
Clone fixes
AnimatedRNG Sep 28, 2017
0fbdb39
Tests should hopefully no longer break CI
AnimatedRNG Sep 28, 2017
4b1a918
Tests longer assume that pointCloudPostProcessor has been created
AnimatedRNG Oct 18, 2017
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
245 changes: 245 additions & 0 deletions Apps/Sandcastle/gallery/3D Tiles Point Cloud Post Processing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
<!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>Max Distance Constraint</td>
<td>
<input type="range" min="0.0" max="10000" step="1" data-bind="value: distanceConstraint, valueUpdate: 'input'">
<input type="text" size="2" data-bind="value: distanceConstraint">
</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,
distanceConstraint : tileset.pointCloudPostProcessorOptions.distanceConstraint,
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('distanceConstraint');
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.
8 changes: 8 additions & 0 deletions Source/Renderer/AutomaticUniforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,14 @@ define([
}
}),

czm_clampedFrustum : new AutomaticUniform({
size : 1,
datatype : WebGLConstants.FLOAT_VEC2,
getValue : function(uniformState) {
return uniformState.clampedFrustum;
}
}),

/**
* The distances to the frustum planes. The top, bottom, left and right distances are
* the x, y, z, and w components, respectively.
Expand Down
15 changes: 15 additions & 0 deletions Source/Renderer/UniformState.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ define([
this._infiniteProjection = Matrix4.clone(Matrix4.IDENTITY);
this._entireFrustum = new Cartesian2();
this._currentFrustum = new Cartesian2();
this._clampedFrustum = new Cartesian2();
this._frustumPlanes = new Cartesian4();

this._frameState = undefined;
Expand Down Expand Up @@ -639,6 +640,18 @@ define([
}
},

/**
* The distance to the clamped near and far planes. The nearest object determines the near
* plane and the farthest object determines the far plane.
* @memberof UniformState.prototype
* @type {Cartesian2}
*/
clampedFrustum : {
get : function() {
return this._clampedFrustum;
}
},

/**
* The the height (<code>x</code>) and the height squared (<code>y</code>)
* in meters of the camera above the 2D world plane. This uniform is only valid
Expand Down Expand Up @@ -991,6 +1004,8 @@ define([

var camera = frameState.camera;
this.updateCamera(camera);
this._clampedFrustum.x = frameState.clampedNear;
this._clampedFrustum.y = frameState.clampedFar;

if (frameState.mode === SceneMode.SCENE2D) {
this._frustum2DWidth = camera.frustum.right - camera.frustum.left;
Expand Down
Loading