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

Procedural IBL Enhancement in CesiumJS #12129

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1c587ce
Draft
ggetz Jul 17, 2024
c0f6f89
Merge branch 'main' into procedural-ibl
ggetz Jul 17, 2024
d835dd1
Merge remote-tracking branch 'origin/ibl-roughness' into procedural-ibl
ggetz Jul 17, 2024
af28f30
Draft
ggetz Jul 25, 2024
ba94101
Draft
ggetz Jul 30, 2024
c4c734c
Merge branch 'main' into procedural-ibl
ggetz Aug 2, 2024
e303b72
Merge remote-tracking branch 'origin/ibl-cubemaps' into procedural-ibl
ggetz Aug 2, 2024
a59ef54
Convolve specular maps
ggetz Aug 6, 2024
7532157
Merge remote-tracking branch 'origin/ibl-multiscatter' into procedura…
ggetz Aug 6, 2024
3e7e4ec
Draft
ggetz Aug 7, 2024
d0a72cd
cleanup
ggetz Aug 9, 2024
f0f1cd4
Merge branch 'main' into procedural-ibl
ggetz Aug 9, 2024
1e1ef3c
Cleanup, add color modifiers
ggetz Aug 13, 2024
e9ac951
Merge branch 'main' into procedural-ibl
ggetz Aug 13, 2024
9930587
Dynamic lighting
ggetz Aug 13, 2024
7458f0a
Hook up 3D Tiles
ggetz Aug 16, 2024
84bbd77
Cleanup
ggetz Aug 16, 2024
53d45a0
Cleanup, fix race condition
ggetz Aug 19, 2024
b85a22e
Fix sky orientation
ggetz Aug 20, 2024
5b4ee24
Cleanup inline doc
ggetz Aug 20, 2024
0a1a8c7
Shader cleanup
ggetz Aug 20, 2024
eb90daa
Update CHANGES.md
ggetz Aug 26, 2024
21045b7
Minor environment map updates
ggetz Aug 26, 2024
c870ca2
Minor updates, spec fixes
ggetz Aug 28, 2024
092f9b7
Spec cleanup
ggetz Aug 28, 2024
3f8c1b1
Spec updates for environment maps
ggetz Aug 29, 2024
298de97
Draft
ggetz Sep 3, 2024
cca3a73
Merge branch 'main' into procedural-ibl
ggetz Sep 11, 2024
feae2a9
Merge branch 'main' into procedural-ibl
ggetz Sep 25, 2024
6b2adb1
Performance pass, cleanup
ggetz Oct 2, 2024
3597350
Performance pass and cleanup
ggetz Oct 3, 2024
4a868aa
Merge branch 'main' into procedural-ibl
ggetz Oct 3, 2024
3bb4c37
Prettier
ggetz Oct 3, 2024
8a96cc2
Update SAndcastle examples
ggetz Oct 3, 2024
bca4341
Unit test fixes
ggetz Oct 3, 2024
8dcf25d
Fix model specs
ggetz Oct 3, 2024
bdc4d15
Fix specs, last SH coefficient
ggetz Oct 4, 2024
219ba6d
Fix import
ggetz Oct 4, 2024
17690a1
Specs fixes for --webgl-stub
ggetz Oct 4, 2024
2d6bc61
Fix docs, update IBL example
ggetz Oct 4, 2024
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
42 changes: 3 additions & 39 deletions Apps/Sandcastle/gallery/Image-Based Lighting.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,7 @@
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar">
<table>
<tbody>
<tr>
<td>Luminance at Zenith</td>
<td>
<input
type="range"
min="0.0"
max="2.0"
step="0.01"
data-bind="value: luminanceAtZenith, valueUpdate: 'input'"
/>
<input type="text" size="4" data-bind="value: luminanceAtZenith" />
</td>
</tr>
</tbody>
</table>
</div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
window.startup = async function (Cesium) {
"use strict";
Expand Down Expand Up @@ -145,26 +127,8 @@
ibl.sphericalHarmonicCoefficients = coefficients;
ibl.specularEnvironmentMaps = environmentMapURL;

// The viewModel tracks the state of our mini application.
const viewModel = {
luminanceAtZenith: ibl.luminanceAtZenith,
};
// Convert the viewModel members into knockout observables.
Cesium.knockout.track(viewModel);

// Bind the viewModel to the DOM elements of the UI that call for it.
const toolbar = document.getElementById("toolbar");
Cesium.knockout.applyBindings(viewModel, toolbar);

function subscribeParameter(name) {
Cesium.knockout
.getObservable(viewModel, name)
.subscribe(function (newValue) {
ibl[name] = newValue;
});
}

subscribeParameter("luminanceAtZenith");
model.environmentMapManager.groundColor =
Cesium.Color.fromCssColorString("#292817");

Sandcastle.addToggleButton(
"Use procedural environment lighting",
Expand Down
2 changes: 2 additions & 0 deletions Apps/Sandcastle/gallery/Lighting.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@
0.8842635425193919,
0.39729481195458805,
),
intensity: 2.0,
});

const flashlight = new Cesium.DirectionalLight({
direction: scene.camera.directionWC, // Updated every frame
intensity: 3.0,
});

const moonLight = new Cesium.DirectionalLight({
Expand Down
Loading
Loading