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

Post processing #5615

Merged
merged 127 commits into from
May 4, 2018
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
834e8cb
Initial post processing
lilleyse Jun 15, 2017
da6035f
Merge branch 'master' into post-processing-1.0
lilleyse Jul 11, 2017
9c8a6d6
Cleanup
lilleyse Jul 11, 2017
a70d8a2
Added composite stage
lilleyse Jul 18, 2017
4ad7479
Added ability to have more complex post process stages
lilleyse Jul 21, 2017
82600fe
added HBAO and DOF
byumjin Jul 25, 2017
d4cc375
Added stepsize parameter at DOF
byumjin Jul 25, 2017
c5dccd4
Fixed texture caching for singly-nested post process effects
lilleyse Aug 23, 2017
b6ed72c
add Bloom(Glow) abd EdgeDetection(Toon)
byumjin Aug 23, 2017
93ef755
Ability to create output framebuffer in the postProcess instead of ex…
lilleyse Aug 24, 2017
266cc7b
Fix casing on file
lilleyse Aug 24, 2017
1faf224
Some cleanup
lilleyse Aug 25, 2017
bebc134
clean up and adjust review
byumjin Aug 28, 2017
2f0d796
Merge branch 'master' into post-processing-1.0
lilleyse Sep 5, 2017
b087d6a
Merge branch 'master' into post-processing-1.0
lilleyse Oct 19, 2017
e803419
Fix indentation
lilleyse Oct 19, 2017
a553d45
Update Sandcastle examples.
bagnell Oct 20, 2017
213b2c3
Move AO generate shader to its own GLSL file.
bagnell Oct 20, 2017
0784d5e
Move AO shaders to GLSL files.
bagnell Oct 23, 2017
66c2da7
Generate random texture at run time.
bagnell Oct 23, 2017
014e660
More clean up from review.
bagnell Oct 23, 2017
2fbf49f
Minor edits and change code flow in favor of early exits.
bagnell Oct 23, 2017
7d6bf80
Remove custom blur shaders.
bagnell Oct 23, 2017
7b8e19c
Renames. Remove 'ao' prefixes.
bagnell Oct 23, 2017
64e6153
More updates from review.
bagnell Oct 23, 2017
1715976
Merge branch 'post-processing-1.0' into hbao
bagnell Oct 23, 2017
7ce73d0
Fix after merge.
bagnell Oct 23, 2017
0855fbe
File rename.
bagnell Oct 23, 2017
2cd80db
Merge pull request #5928 from AnalyticalGraphicsInc/hbao
bagnell Oct 23, 2017
1fe6b81
Merge branch 'master' into post-processing-1.0
bagnell Oct 23, 2017
16ca244
Move most of the shaders to their own GLSL files.
bagnell Oct 24, 2017
ee72f6a
Remove dup blur shaders and move the rest to their own GLSL files.
bagnell Oct 24, 2017
689ce04
Rename toon -> silhouette.
bagnell Oct 25, 2017
0f16fbb
Update lens flare example to show bug. Remove duplicate pass through …
bagnell Oct 25, 2017
1d3ed16
Move depth of field shader to its own file.
bagnell Oct 25, 2017
db94906
Move pass through color, depth and debug depth shaders to post proces…
bagnell Oct 27, 2017
3b7e984
Merge remote-tracking branch 'jin/post-processing-1.0' into post-proc…
bagnell Oct 27, 2017
9b48d51
Remove files after merge.
bagnell Oct 27, 2017
e974825
Clean up after merge.
bagnell Oct 27, 2017
51e2a0c
Rename Edge Detection -> Silhouette and re-snapped image.
bagnell Oct 27, 2017
1c5161a
Merge pull request #5945 from AnalyticalGraphicsInc/post-processing-m…
bagnell Oct 27, 2017
d2adb27
Initial re-arch. Update sun post process.
bagnell Oct 30, 2017
5f60ba2
Make sun port process use a composite and remove uniform 'u_' prefixes.
bagnell Oct 31, 2017
ec358a0
Rework existing post processes.
bagnell Nov 1, 2017
c70bf3d
Simplification of composites and clean up.
bagnell Nov 1, 2017
8b4e0ea
Re-add texture loading from a string uniform value.
bagnell Nov 2, 2017
4132972
Give post-processes an enabled property. Make HBAO and FXAA built-in …
bagnell Nov 2, 2017
6c89895
Make bloom a built-in process. WIP.
bagnell Nov 2, 2017
5939ac1
Merge branch 'master' into post-processing-1.0
bagnell Nov 3, 2017
50c579a
Merge branch 'post-processing-1.0' into post-process-rearch
bagnell Nov 3, 2017
7da72b4
Merge branch 'master' into post-processing-1.0
bagnell Dec 18, 2017
939bf28
Merge branch 'post-processing-1.0' into post-process-rearch
bagnell Dec 18, 2017
e9e450e
Move blur to its own stage.
bagnell Dec 18, 2017
a1385cf
Add scissor rectangle to post process for sun post process.
bagnell Dec 18, 2017
f5b368f
Fix tests and eslint errors.
bagnell Dec 19, 2017
fed5c55
Add some tests.
bagnell Dec 19, 2017
f30c858
Fix typo.
bagnell Dec 19, 2017
0a8823f
Fix broken stub tests.
bagnell Dec 20, 2017
3fe047c
Fix stub tests again.
bagnell Dec 20, 2017
c244e73
Implement the rest of the collection interface for post process colle…
bagnell Dec 20, 2017
c9d3a33
Reference each post process by name as a uniform value.
bagnell Dec 21, 2017
500df66
Fix enabling/disabling depth of field.
bagnell Dec 21, 2017
b514464
Fix silhouette and sun post process.
bagnell Dec 21, 2017
4818d78
Fix failing test.
bagnell Dec 21, 2017
2cb380f
Merge branch 'master' into post-processing-1.0
bagnell Jan 8, 2018
94f618c
Remove clear from post-process interface.
bagnell Jan 9, 2018
2d54010
Remove outputTexture from interface.
bagnell Jan 9, 2018
5835edc
Add concept of executing a composite in 'parallel'.
bagnell Jan 9, 2018
f4c3e8d
Remove execute from interface. The collection executes the processes …
bagnell Jan 9, 2018
9686e47
Post process dependency graph WIP.
bagnell Jan 11, 2018
f6e906e
Post process dependencies WIP.
bagnell Jan 11, 2018
5b3da89
Clean up.
bagnell Jan 11, 2018
6137119
Have the texture cache clear all of its framebuffers.
bagnell Jan 11, 2018
3532edc
Fix dependency when process is disabled.
bagnell Jan 11, 2018
54e68f8
Temporarily disable sun.
bagnell Jan 11, 2018
125581d
Only update framebuffers when process is enabled/disabled or added/re…
bagnell Jan 11, 2018
6fbd1fa
Make sun post process its own collection for now.
bagnell Jan 15, 2018
ef8ae7b
Recreate the cache when a process is added or removed. Fixes tests.
bagnell Jan 15, 2018
4b1cd51
Do not use invert classification when depth textures are not supported.
bagnell Jan 15, 2018
ae37bfc
Add doc.
bagnell Jan 17, 2018
25203b4
Remove bloom from library and add DoF test.
bagnell Jan 18, 2018
aaffaa6
Merge branch 'master' into post-processing-1.0
bagnell Jan 19, 2018
e36a52a
Move all built-in stages to factory. Add more doc.
bagnell Jan 24, 2018
5d96caf
Renames uniformValues -> uniforms, process -> stage.
bagnell Jan 25, 2018
c4e892d
Shader renames.
bagnell Jan 25, 2018
28ad66b
Renames PostProcess -> PostProcessStage.
bagnell Jan 25, 2018
78d5242
Remove circular reference.
bagnell Jan 25, 2018
112f968
Add more tests and doc.
bagnell Jan 30, 2018
500660d
Disable lens flare when not in space. Fix dirt texture sampling.
bagnell Jan 30, 2018
1bbe961
Add post-process shortcut to viewer.
bagnell Jan 30, 2018
3715bdb
Fix output texture uniform and remove texture overlay stage.
bagnell Jan 30, 2018
317d63d
Update Sandcastle examples.
bagnell Jan 30, 2018
400c5fc
Rename executeInSeries -> inputPreviousStageTexture.
bagnell Jan 31, 2018
55ee446
Update CHANGES.md.
bagnell Jan 31, 2018
ee6353a
Merge branch 'master' into post-processing-1.0
bagnell Feb 2, 2018
ac71370
Update Sandcastle example from review.
bagnell Feb 2, 2018
4eba88d
Merge branch 'master' into post-processing-1.0
bagnell Feb 6, 2018
06b7fb2
Updates from review.
bagnell Feb 6, 2018
beac0b5
Merge branch 'master' into post-processing-1.0
bagnell Mar 21, 2018
035e297
Merge branch 'log-depth-buffer' into post-process-log-z
bagnell Mar 22, 2018
bf5ce51
Adjust post process stages to use log depth when enabled.
bagnell Mar 22, 2018
957620a
Merge branch 'log-depth-buffer' into post-process-log-z
bagnell Mar 26, 2018
fcc3ded
Merge branch 'master' into post-processing-1.0
bagnell Mar 26, 2018
fb3f15a
Merge branch 'log-depth-buffer' into post-processing-1.0
bagnell Apr 2, 2018
b2f2f35
Update CHANGES.md.
bagnell Apr 2, 2018
a17343f
Merge branch 'log-depth-buffer' into post-processing-1.0
bagnell Apr 5, 2018
9fd5ab3
Merge branch 'log-depth-buffer' into post-processing-1.0
bagnell Apr 10, 2018
36eb23a
Make eight bit a sandcastle example for making a custom post process.
bagnell Apr 10, 2018
1f8bd16
Remove eight bit shader and test.
bagnell Apr 10, 2018
4b05583
Merge branch 'master' into post-processing-1.0
lilleyse Apr 12, 2018
9cf5469
Add ability to use an image, canvas, or video as a uniform. Updates f…
bagnell Apr 18, 2018
408f5ca
Remove terrain from lens flare example.
bagnell Apr 18, 2018
49b5d87
Merge branch 'master' into post-processing-1.0
bagnell Apr 18, 2018
8a5bef0
Fix resizing post process framebuffers.
bagnell Apr 19, 2018
55ae1a1
Merge branch 'master' into post-processing-1.0
bagnell May 1, 2018
6682e22
Fix silhouette in Edge.
bagnell May 2, 2018
f6d3654
Fix blank screen and FXAA in IE.
bagnell May 2, 2018
a68418c
Do not execute stages that require a depth texture and the extension …
bagnell May 2, 2018
1928b7f
Fix crash when the Sun is visible after last commit.
bagnell May 2, 2018
b9b8e0c
Merge branch 'master' into post-processing-1.0
bagnell May 2, 2018
8d6ad17
Update tests to check for depth textures and change requiresDepthText…
bagnell May 3, 2018
6e53e43
Updates from review.
bagnell May 3, 2018
5e11e9e
Modify random value texture sampling.
bagnell May 3, 2018
4468f92
Merge branch 'master' into post-processing-1.0
lilleyse May 4, 2018
84e242a
Fix failing test.
bagnell May 4, 2018
3534c15
Add console warning when a post process isn't supported in a Sandcast…
bagnell May 4, 2018
12c79e7
Fix failing test.
bagnell May 4, 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
144 changes: 144 additions & 0 deletions Apps/Sandcastle/gallery/Post Processing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<!DOCTYPE html>
Copy link
Contributor Author

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.

Copy link
Contributor

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.

<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');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This demo should now set shouldAnimate : true to start animating right away.

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>
218 changes: 0 additions & 218 deletions Source/Scene/FXAA.js

This file was deleted.

Loading