-
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
Post processing #5615
Merged
Merged
Post processing #5615
Changes from 10 commits
Commits
Show all changes
127 commits
Select commit
Hold shift + click to select a range
834e8cb
Initial post processing
lilleyse da6035f
Merge branch 'master' into post-processing-1.0
lilleyse 9c8a6d6
Cleanup
lilleyse a70d8a2
Added composite stage
lilleyse 4ad7479
Added ability to have more complex post process stages
lilleyse 82600fe
added HBAO and DOF
byumjin d4cc375
Added stepsize parameter at DOF
byumjin c5dccd4
Fixed texture caching for singly-nested post process effects
lilleyse b6ed72c
add Bloom(Glow) abd EdgeDetection(Toon)
byumjin 93ef755
Ability to create output framebuffer in the postProcess instead of ex…
lilleyse 266cc7b
Fix casing on file
lilleyse 1faf224
Some cleanup
lilleyse bebc134
clean up and adjust review
byumjin 2f0d796
Merge branch 'master' into post-processing-1.0
lilleyse b087d6a
Merge branch 'master' into post-processing-1.0
lilleyse e803419
Fix indentation
lilleyse a553d45
Update Sandcastle examples.
bagnell 213b2c3
Move AO generate shader to its own GLSL file.
bagnell 0784d5e
Move AO shaders to GLSL files.
bagnell 66c2da7
Generate random texture at run time.
bagnell 014e660
More clean up from review.
bagnell 2fbf49f
Minor edits and change code flow in favor of early exits.
bagnell 7d6bf80
Remove custom blur shaders.
bagnell 7b8e19c
Renames. Remove 'ao' prefixes.
bagnell 64e6153
More updates from review.
bagnell 1715976
Merge branch 'post-processing-1.0' into hbao
bagnell 7ce73d0
Fix after merge.
bagnell 0855fbe
File rename.
bagnell 2cd80db
Merge pull request #5928 from AnalyticalGraphicsInc/hbao
bagnell 1fe6b81
Merge branch 'master' into post-processing-1.0
bagnell 16ca244
Move most of the shaders to their own GLSL files.
bagnell ee72f6a
Remove dup blur shaders and move the rest to their own GLSL files.
bagnell 689ce04
Rename toon -> silhouette.
bagnell 0f16fbb
Update lens flare example to show bug. Remove duplicate pass through …
bagnell 1d3ed16
Move depth of field shader to its own file.
bagnell db94906
Move pass through color, depth and debug depth shaders to post proces…
bagnell 3b7e984
Merge remote-tracking branch 'jin/post-processing-1.0' into post-proc…
bagnell 9b48d51
Remove files after merge.
bagnell e974825
Clean up after merge.
bagnell 51e2a0c
Rename Edge Detection -> Silhouette and re-snapped image.
bagnell 1c5161a
Merge pull request #5945 from AnalyticalGraphicsInc/post-processing-m…
bagnell d2adb27
Initial re-arch. Update sun post process.
bagnell 5f60ba2
Make sun port process use a composite and remove uniform 'u_' prefixes.
bagnell ec358a0
Rework existing post processes.
bagnell c70bf3d
Simplification of composites and clean up.
bagnell 8b4e0ea
Re-add texture loading from a string uniform value.
bagnell 4132972
Give post-processes an enabled property. Make HBAO and FXAA built-in …
bagnell 6c89895
Make bloom a built-in process. WIP.
bagnell 5939ac1
Merge branch 'master' into post-processing-1.0
bagnell 50c579a
Merge branch 'post-processing-1.0' into post-process-rearch
bagnell 7da72b4
Merge branch 'master' into post-processing-1.0
bagnell 939bf28
Merge branch 'post-processing-1.0' into post-process-rearch
bagnell e9e450e
Move blur to its own stage.
bagnell a1385cf
Add scissor rectangle to post process for sun post process.
bagnell f5b368f
Fix tests and eslint errors.
bagnell fed5c55
Add some tests.
bagnell f30c858
Fix typo.
bagnell 0a8823f
Fix broken stub tests.
bagnell 3fe047c
Fix stub tests again.
bagnell c244e73
Implement the rest of the collection interface for post process colle…
bagnell c9d3a33
Reference each post process by name as a uniform value.
bagnell 500df66
Fix enabling/disabling depth of field.
bagnell b514464
Fix silhouette and sun post process.
bagnell 4818d78
Fix failing test.
bagnell 2cb380f
Merge branch 'master' into post-processing-1.0
bagnell 94f618c
Remove clear from post-process interface.
bagnell 2d54010
Remove outputTexture from interface.
bagnell 5835edc
Add concept of executing a composite in 'parallel'.
bagnell f4c3e8d
Remove execute from interface. The collection executes the processes …
bagnell 9686e47
Post process dependency graph WIP.
bagnell f6e906e
Post process dependencies WIP.
bagnell 5b3da89
Clean up.
bagnell 6137119
Have the texture cache clear all of its framebuffers.
bagnell 3532edc
Fix dependency when process is disabled.
bagnell 54e68f8
Temporarily disable sun.
bagnell 125581d
Only update framebuffers when process is enabled/disabled or added/re…
bagnell 6fbd1fa
Make sun post process its own collection for now.
bagnell ef8ae7b
Recreate the cache when a process is added or removed. Fixes tests.
bagnell 4b1cd51
Do not use invert classification when depth textures are not supported.
bagnell ae37bfc
Add doc.
bagnell 25203b4
Remove bloom from library and add DoF test.
bagnell aaffaa6
Merge branch 'master' into post-processing-1.0
bagnell e36a52a
Move all built-in stages to factory. Add more doc.
bagnell 5d96caf
Renames uniformValues -> uniforms, process -> stage.
bagnell c4e892d
Shader renames.
bagnell 28ad66b
Renames PostProcess -> PostProcessStage.
bagnell 78d5242
Remove circular reference.
bagnell 112f968
Add more tests and doc.
bagnell 500660d
Disable lens flare when not in space. Fix dirt texture sampling.
bagnell 1bbe961
Add post-process shortcut to viewer.
bagnell 3715bdb
Fix output texture uniform and remove texture overlay stage.
bagnell 317d63d
Update Sandcastle examples.
bagnell 400c5fc
Rename executeInSeries -> inputPreviousStageTexture.
bagnell 55ee446
Update CHANGES.md.
bagnell ee6353a
Merge branch 'master' into post-processing-1.0
bagnell ac71370
Update Sandcastle example from review.
bagnell 4eba88d
Merge branch 'master' into post-processing-1.0
bagnell 06b7fb2
Updates from review.
bagnell beac0b5
Merge branch 'master' into post-processing-1.0
bagnell 035e297
Merge branch 'log-depth-buffer' into post-process-log-z
bagnell bf5ce51
Adjust post process stages to use log depth when enabled.
bagnell 957620a
Merge branch 'log-depth-buffer' into post-process-log-z
bagnell fcc3ded
Merge branch 'master' into post-processing-1.0
bagnell fb3f15a
Merge branch 'log-depth-buffer' into post-processing-1.0
bagnell b2f2f35
Update CHANGES.md.
bagnell a17343f
Merge branch 'log-depth-buffer' into post-processing-1.0
bagnell 9fd5ab3
Merge branch 'log-depth-buffer' into post-processing-1.0
bagnell 36eb23a
Make eight bit a sandcastle example for making a custom post process.
bagnell 1f8bd16
Remove eight bit shader and test.
bagnell 4b05583
Merge branch 'master' into post-processing-1.0
lilleyse 9cf5469
Add ability to use an image, canvas, or video as a uniform. Updates f…
bagnell 408f5ca
Remove terrain from lens flare example.
bagnell 49b5d87
Merge branch 'master' into post-processing-1.0
bagnell 8a5bef0
Fix resizing post process framebuffers.
bagnell 55ae1a1
Merge branch 'master' into post-processing-1.0
bagnell 6682e22
Fix silhouette in Edge.
bagnell f6d3654
Fix blank screen and FXAA in IE.
bagnell a68418c
Do not execute stages that require a depth texture and the extension …
bagnell 1928b7f
Fix crash when the Sun is visible after last commit.
bagnell b9b8e0c
Merge branch 'master' into post-processing-1.0
bagnell 8d6ad17
Update tests to check for depth textures and change requiresDepthText…
bagnell 6e53e43
Updates from review.
bagnell 5e11e9e
Modify random value texture sampling.
bagnell 4468f92
Merge branch 'master' into post-processing-1.0
lilleyse 84e242a
Fix failing test.
bagnell 3534c15
Add console warning when a post process isn't supported in a Sandcast…
bagnell 12c79e7
Fix failing test.
bagnell 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
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,144 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
<meta name="description" content="Post processing effects."> | ||
<meta name="cesium-sandcastle-labels" content="Showcases"> | ||
<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); | ||
</style> | ||
<div id="cesiumContainer" class="fullSize"></div> | ||
<div id="loadingOverlay"><h1>Loading...</h1></div> | ||
<div id="toolbar"> | ||
<table><tbody> | ||
<tr> | ||
<td>blackAndWhite</td> | ||
<td> | ||
<input type="checkbox" data-bind="checked: blackAndWhiteShow"> | ||
<input type="range" min="1" max="10" step="1" data-bind="value: blackAndWhiteGradations, valueUpdate: 'input'"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>brightness</td> | ||
<td> | ||
<input type="checkbox" data-bind="checked: brightnessShow"> | ||
<input type="range" min="0" max="1" step="0.01" data-bind="value: brightnessValue, valueUpdate: 'input'"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>8-bit</td> | ||
<td> | ||
<input type="checkbox" data-bind="checked: eightBitShow"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Night Vision</td> | ||
<td> | ||
<input type="checkbox" data-bind="checked: nightVisionShow"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Texture Overlay</td> | ||
<td> | ||
<input type="checkbox" data-bind="checked: textureOverlayShow"> | ||
<input type="range" min="0" max="1" step="0.01" data-bind="value: textureOverlayAlpha, valueUpdate: 'input'"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Depth View</td> | ||
<td> | ||
<input type="checkbox" data-bind="checked: depthViewShow"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Composite Test</td> | ||
<td> | ||
<input type="checkbox" data-bind="checked: compositeTestShow"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Ambient Occlusion</td> | ||
<td> | ||
<input type="checkbox" data-bind="checked: ambientOcclusionShow"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>FXAA</td> | ||
<td> | ||
<input type="checkbox" data-bind="checked: fxaaShow"> | ||
</td> | ||
</tr> | ||
</tbody></table> | ||
</div> | ||
<script id="cesium_sandcastle_script"> | ||
function startup(Cesium) { | ||
'use strict'; | ||
//Sandcastle_Begin | ||
var viewer = new Cesium.Viewer('cesiumContainer'); | ||
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. This demo should now set |
||
var scene = viewer.scene; | ||
var postProcess = scene.postProcess; | ||
scene.globe.depthTestAgainstTerrain = true; | ||
scene.fxaa = false; | ||
|
||
var viewModel = { | ||
blackAndWhiteShow: false, | ||
blackAndWhiteGradations: 5.0, | ||
brightnessShow: false, | ||
brightnessValue: 0.5, | ||
eightBitShow: false, | ||
nightVisionShow: false, | ||
textureOverlayShow: false, | ||
textureOverlayAlpha: 0.5, | ||
depthViewShow: false, | ||
compositeTestShow: false, | ||
ambientOcclusionShow: false, | ||
fxaaShow: false | ||
}; | ||
|
||
Cesium.knockout.track(viewModel); | ||
var toolbar = document.getElementById('toolbar'); | ||
Cesium.knockout.applyBindings(viewModel, toolbar); | ||
for (var name in viewModel) { | ||
if (viewModel.hasOwnProperty(name)) { | ||
Cesium.knockout.getObservable(viewModel, name).subscribe(updatePostProcess); | ||
} | ||
} | ||
|
||
function updatePostProcess() { | ||
postProcess.blackAndWhite.show = Boolean(viewModel.blackAndWhiteShow); | ||
postProcess.blackAndWhite.uniformValues.gradations = Number(viewModel.blackAndWhiteGradations); | ||
postProcess.brightness.show = Boolean(viewModel.brightnessShow); | ||
postProcess.brightness.uniformValues.brightness = Number(viewModel.brightnessValue); | ||
postProcess.eightBit.show = Boolean(viewModel.eightBitShow); | ||
postProcess.nightVision.show = Boolean(viewModel.nightVisionShow); | ||
postProcess.textureOverlay.show = Boolean(viewModel.textureOverlayShow); | ||
postProcess.textureOverlay.uniformValues.alpha = Number(viewModel.textureOverlayAlpha); | ||
postProcess.depthView.show = Boolean(viewModel.depthViewShow); | ||
postProcess.compositeTest.show = Boolean(viewModel.compositeTestShow); | ||
postProcess.ambientOcclusion.show = Boolean(viewModel.ambientOcclusionShow); | ||
scene.fxaa = Boolean(viewModel.fxaaShow); | ||
} | ||
//Sandcastle_End | ||
Sandcastle.finishedLoading(); | ||
} | ||
if (typeof Cesium !== "undefined") { | ||
startup(Cesium); | ||
} else if (typeof require === "function") { | ||
require(["Cesium"], startup); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
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.
In the image for this demo it's hard to see the silhouette.
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.
Updated to show the black and white stage.