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

Splat shader #12364

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0103673
initial vertex calcs for splats
keyboardspecialist Jun 7, 2024
ea53962
removed early returns. we seem to hit them all the time
keyboardspecialist Jun 8, 2024
60022f4
covariance fixes
keyboardspecialist Jun 12, 2024
ba77e31
hack to switch primitive type points to triangle_strips
keyboardspecialist Jun 13, 2024
8d67853
refactor, use inverse matrices
keyboardspecialist Jun 17, 2024
9aaf292
final point primitive experiment. moving to quads
keyboardspecialist Jun 18, 2024
8c3aea4
quad drawing.
keyboardspecialist Jun 19, 2024
7a3f472
new splat pipeline files
keyboardspecialist Jun 21, 2024
4f9c886
shader org
keyboardspecialist Jun 21, 2024
b235c09
switched rendering to not need vertex buffer attr
keyboardspecialist Jun 21, 2024
df28196
tweaks
keyboardspecialist Jun 21, 2024
bdf4eb5
detect KHR_gaussian_splatting extension and set props and prime for p…
keyboardspecialist Jun 26, 2024
7a4c864
Buffer rework. inject attribute buffer for screen space quad at gltf …
keyboardspecialist Jun 28, 2024
c6b8d25
splats but bad projection
keyboardspecialist Jul 1, 2024
a03abdd
shader cleanup, simplification
keyboardspecialist Jul 1, 2024
7d5b09a
minor tweaks
keyboardspecialist Jul 1, 2024
0620dca
tweaks
keyboardspecialist Jul 1, 2024
fe340a4
Fixed position and color buffers
keyboardspecialist Jul 1, 2024
e352ca2
scaling?
keyboardspecialist Jul 1, 2024
3e74c74
added new GAUSSIAN_SPLAT pass
keyboardspecialist Jul 2, 2024
d5f4069
pipeline execution for splats
keyboardspecialist Jul 2, 2024
13dfa78
splats sorted via countSort
keyboardspecialist Jul 2, 2024
31e8d13
invalidates splat commands when camera moves
keyboardspecialist Jul 3, 2024
947d9e0
gaurded splat vertex setup in builddrawcommand
keyboardspecialist Jul 3, 2024
9862eeb
command rebuild under control
keyboardspecialist Jul 3, 2024
0069114
guard gaussian pipeline stage
keyboardspecialist Jul 3, 2024
427d490
sorting fixes
keyboardspecialist Jul 4, 2024
fcfc3df
cleanup
keyboardspecialist Jul 8, 2024
f4657c6
opacity fix
keyboardspecialist Jul 9, 2024
2270dae
small tweak to re-enable instanceDivisor check on attr 0
keyboardspecialist Jul 12, 2024
fb180f6
splat scale now adjustable with 3DTile style
keyboardspecialist Jul 12, 2024
43c08cf
toggle between points and splats at runtime
keyboardspecialist Jul 12, 2024
2b1e72a
Merge branch 'main' into splat-shader
keyboardspecialist Oct 9, 2024
52b3d61
fixes from latest merge
keyboardspecialist Oct 22, 2024
f207786
shader updates improves performance and visual quality
keyboardspecialist Oct 25, 2024
18d75d2
staging for demo
keyboardspecialist Nov 4, 2024
ddceea8
Add unsigned int pixel datatype
keyboardspecialist Nov 13, 2024
d2441cf
guassian texture pipeline
keyboardspecialist Nov 14, 2024
3c7bae6
splat index attr
keyboardspecialist Nov 15, 2024
6061b17
splatting texture pipeline updates and improvements
keyboardspecialist Nov 20, 2024
b2f5aa2
Lots of pipeline changes.
keyboardspecialist Nov 22, 2024
361312b
temporary wasm package integration for CI and sandcastle until NPM
keyboardspecialist Nov 22, 2024
1991389
missing files
keyboardspecialist Nov 22, 2024
baf322d
Rendering fixes and tweaks
keyboardspecialist Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .github/actions/check-for-CLA/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const getValuesFromGoogleSheet = async (sheetId, cellRanges) => {
const checkIfIndividualCLAFound = async () => {
const response = await getValuesFromGoogleSheet(
GOOGLE_SHEETS_INFO.individualCLASheetId,
"D2:D",
"D2:D"
);

const rows = response.data.values;
Expand All @@ -68,7 +68,7 @@ const checkIfIndividualCLAFound = async () => {
const checkIfCorporateCLAFound = async () => {
const response = await getValuesFromGoogleSheet(
GOOGLE_SHEETS_INFO.corporateCLASheetId,
"H2:H",
"H2:H"
);

const rows = response.data.values;
Expand Down Expand Up @@ -107,9 +107,9 @@ const getCommentBody = (hasSignedCLA, errorFoundOnCLACheck) => {
const commentTemplate = fs.readFileSync(
join(
dirname(fileURLToPath(import.meta.url)),
"templates/pullRequestComment.hbs",
"templates/pullRequestComment.hbs"
),
"utf-8",
"utf-8"
);

const getCommentFromTemplate = Handlebars.compile(commentTemplate);
Expand Down Expand Up @@ -138,7 +138,7 @@ const postCommentOnPullRequest = async (hasSignedCLA, errorFoundOnCLACheck) => {
accept: "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
},
},
}
);
};

Expand Down
5 changes: 3 additions & 2 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/node_modules
/ThirdParty
/Tools/**
temp_wasm/*

CHANGES.md
LICENSE.md
CHANGES.md
LICENSE.md
6 changes: 3 additions & 3 deletions Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function main() {
let baseLayer;
if (defined(endUserOptions.tmsImageryUrl)) {
baseLayer = ImageryLayer.fromProviderAsync(
TileMapServiceImageryProvider.fromUrl(endUserOptions.tmsImageryUrl),
TileMapServiceImageryProvider.fromUrl(endUserOptions.tmsImageryUrl)
);
}

Expand Down Expand Up @@ -222,11 +222,11 @@ async function main() {
let hpr = "";
if (defined(camera.heading)) {
hpr = `,${CesiumMath.toDegrees(camera.heading)},${CesiumMath.toDegrees(
camera.pitch,
camera.pitch
)},${CesiumMath.toDegrees(camera.roll)}`;
}
endUserOptions.view = `${CesiumMath.toDegrees(
position.longitude,
position.longitude
)},${CesiumMath.toDegrees(position.latitude)},${position.height}${hpr}`;
history.replaceState(undefined, "", `?${objectToQuery(endUserOptions)}`);
}
Expand Down
2 changes: 1 addition & 1 deletion Apps/CesiumViewer/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Use correct character set. -->
Expand Down
2 changes: 1 addition & 1 deletion Apps/HelloWorld.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Use correct character set. -->
Expand Down
72 changes: 36 additions & 36 deletions Apps/Sandcastle/CesiumSandcastle.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ require({
dojoscript,
LinkButton,
ClipboardJS,
pako,
pako
) {
"use strict";
// attach clipboard handling to our Copy button
Expand Down Expand Up @@ -234,7 +234,7 @@ require({
function clearRun() {
domClass.remove(
registry.byId("buttonRun").domNode,
"highlightToolbarButton",
"highlightToolbarButton"
);
}

Expand Down Expand Up @@ -336,8 +336,8 @@ require({
function openGalleryTooltip() {
galleryTooltipTimer = undefined;

const selectedTabName =
registry.byId("innerPanel").selectedChildWidget.title;
const selectedTabName = registry.byId("innerPanel").selectedChildWidget
.title;
let suffix = `${selectedTabName}Demos`;
if (selectedTabName === "All") {
suffix = "all";
Expand Down Expand Up @@ -395,7 +395,7 @@ require({
line = jsEditor.setGutterMarker(
i,
"searchGutter",
makeLineLabel(`Search: ${searchTerm}`, "searchMarker"),
makeLineLabel(`Search: ${searchTerm}`, "searchMarker")
);
jsEditor.addLineClass(line, "text", "searchLine");
errorLines.push(line);
Expand All @@ -415,7 +415,7 @@ require({
line = jsEditor.setGutterMarker(
scriptLineToEditorLine(hint.line),
"hintGutter",
makeLineLabel(hint.reason, "hintMarker"),
makeLineLabel(hint.reason, "hintMarker")
);
jsEditor.addLineClass(line, "text", "hintLine");
errorLines.push(line);
Expand Down Expand Up @@ -453,7 +453,7 @@ require({
{
line: lineNumber - 1,
ch: 0,
},
}
);
jsEditor.focus();
jsEditor.setSelection(
Expand All @@ -464,7 +464,7 @@ require({
{
line: lineNumber,
ch: 0,
},
}
);
}
}
Expand All @@ -481,7 +481,7 @@ require({
line = jsEditor.setGutterMarker(
lineNum,
"highlightGutter",
makeLineLabel("highlighted by demo", "highlightMarker"),
makeLineLabel("highlighted by demo", "highlightMarker")
);
jsEditor.addLineClass(line, "text", "highlightLine");
highlightLines.push(line);
Expand Down Expand Up @@ -516,7 +516,7 @@ require({
demoContainer.scrollLeft -= (e.wheelDelta * 70) / 120;
}
},
false,
false
);
} else {
demoContainer.addEventListener(
Expand All @@ -526,7 +526,7 @@ require({
demoContainer.scrollLeft += (e.detail * 70) / 3;
}
},
false,
false
);
}
}
Expand Down Expand Up @@ -572,7 +572,7 @@ require({
Tab: "indentMore",
"Shift-Tab": "indentLess",
},
},
}
);

window.onbeforeunload = function (e) {
Expand Down Expand Up @@ -626,7 +626,7 @@ require({
appendConsole(
"consoleError",
"Make sure Cesium is built, see the Contributor's Guide for details.",
true,
true
);
}
};
Expand Down Expand Up @@ -673,7 +673,7 @@ require({

element.textContent = embedInSandcastleTemplate(
jsEditor.getValue(),
isFirefox,
isFirefox
);
bucketDoc.body.appendChild(element);
}
Expand All @@ -697,7 +697,7 @@ require({
appendConsole(
"consoleError",
`Error, first part of ${local.bucketName} must match first part of bucket.html exactly.`,
true,
true
);
} else {
const bodyAttributes = local.headers.match(/<body([^>]*?)>/)[1];
Expand All @@ -719,7 +719,7 @@ require({
const pos = local.headers.indexOf("</head>");
const extraHeaders = local.headers.substring(
local.emptyBucket.length,
pos,
pos
);
bucketDoc.head.innerHTML += extraHeaders;
activateBucketScripts(bucketDoc);
Expand Down Expand Up @@ -828,7 +828,7 @@ require({
appendConsole(
"consoleError",
`Unable to GET gist from GitHub API. This could be due to too many requests from your IP. Try again in an hour or copy and paste the code from the gist: https://gist.github.com/${queryObject.gist}`,
true,
true
);
console.log(error);
});
Expand All @@ -851,13 +851,13 @@ require({
const doc = parser.parseFromString(demo.code, "text/html");

const script = doc.querySelector(
'script[id="cesium_sandcastle_script"]',
'script[id="cesium_sandcastle_script"]'
);
if (!script) {
appendConsole(
"consoleError",
`Error reading source file: ${demo.name}`,
true,
true
);
return;
}
Expand All @@ -867,7 +867,7 @@ require({
appendConsole(
"consoleError",
`Error reading source file: ${demo.name}`,
true,
true
);
return;
}
Expand Down Expand Up @@ -903,7 +903,7 @@ require({
document.title = `${e.state.name} - Cesium Sandcastle`;
}
},
false,
false
);

window.addEventListener(
Expand All @@ -930,25 +930,25 @@ require({
appendConsole(
"consoleError",
'Documentation not available. Please run the "build-docs" build script to generate Cesium documentation.',
true,
true
);
showGallery();
}
if (galleryError) {
appendConsole(
"consoleError",
"Error loading gallery, please run the build script.",
true,
true
);
}
if (deferredLoadError) {
appendConsole(
"consoleLog",
`Unable to load demo named ${queryObject.src.replace(
".html",
"",
""
)}. Redirecting to HelloWorld.\n`,
true,
true
);
}
}
Expand All @@ -970,7 +970,7 @@ require({
line = jsEditor.setGutterMarker(
lineNumber,
"errorGutter",
makeLineLabel(e.data.error, "errorMarker"),
makeLineLabel(e.data.error, "errorMarker")
);
jsEditor.addLineClass(line, "text", "errorLine");
errorLines.push(line);
Expand All @@ -986,7 +986,7 @@ require({
highlightLine(e.data.highlight);
}
},
true,
true
);

registry.byId("jsContainer").on("show", function () {
Expand Down Expand Up @@ -1061,7 +1061,7 @@ require({
// we save a few bytes by omitting the leading [" and trailing "] since they are always the same
jsonString = jsonString.substr(2, jsonString.length - 4);
let base64String = btoa(
pako.deflate(jsonString, { raw: true, to: "string", level: 9 }),
pako.deflate(jsonString, { raw: true, to: "string", level: 9 })
);
base64String = base64String.replace(/\=+$/, ""); // remove padding

Expand Down Expand Up @@ -1107,7 +1107,7 @@ require({
let confirmChange = true;
if (demoHtml !== htmlText || demoCode !== jsText) {
confirmChange = window.confirm(
"You have unsaved changes. Are you sure you want to navigate away from this demo?",
"You have unsaved changes. Are you sure you want to navigate away from this demo?"
);
}
if (confirmChange) {
Expand All @@ -1132,7 +1132,7 @@ require({
local.headers
}\n${htmlEditor.getValue()}<script id="cesium_sandcastle_script">\n${embedInSandcastleTemplate(
jsEditor.getValue(),
false,
false
)}</script>\n` +
`</body>\n` +
`</html>\n`
Expand All @@ -1143,20 +1143,20 @@ require({
let currentDemoName = queryObject.src;
currentDemoName = currentDemoName.replace(".html", "");
const description = encodeHTML(
registry.byId("description").get("value").replace(/\n/g, "\\n"),
registry.byId("description").get("value").replace(/\n/g, "\\n")
).replace(/\"/g, "&quot;");
const label = encodeHTML(
registry.byId("label").get("value").replace(/\n/g, "\\n"),
registry.byId("label").get("value").replace(/\n/g, "\\n")
).replace(/\"/g, "&quot;");

let html = getDemoHtml();
html = html.replace(
"<title>",
`<meta name="description" content="${description}">\n <title>`,
`<meta name="description" content="${description}">\n <title>`
);
html = html.replace(
"<title>",
`<meta name="cesium-sandcastle-labels" content="${label}">\n <title>`,
`<meta name="cesium-sandcastle-labels" content="${label}">\n <title>`
);

const octetBlob = new Blob([html], {
Expand Down Expand Up @@ -1242,7 +1242,7 @@ require({
demo.description = description ? description : "";

const labelsMeta = doc.querySelector(
'meta[name="cesium-sandcastle-labels"]',
'meta[name="cesium-sandcastle-labels"]'
);
const labels = labelsMeta && labelsMeta.getAttribute("content");
if (demo.isNew) {
Expand Down Expand Up @@ -1356,7 +1356,7 @@ require({
let confirmChange = true;
if (demoHtml !== htmlText || demoCode !== jsText) {
confirmChange = window.confirm(
"You have unsaved changes. Are you sure you want to navigate away from this demo?",
"You have unsaved changes. Are you sure you want to navigate away from this demo?"
);
}
if (confirmChange) {
Expand Down
4 changes: 2 additions & 2 deletions Apps/Sandcastle/LinkButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define([
_WidgetBase,
declare,
domClass,
template,
template
) {
"use strict";

Expand All @@ -34,6 +34,6 @@ define([
this._set("label", content);
(this.containerNode || this.focusNode).innerHTML = content;
},
},
}
);
});
Loading
Loading