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

WebGPURenderer: Logarithmic Depth Refinement #29561

Merged
merged 4 commits into from
Oct 6, 2024

Conversation

PoseidonEnergy
Copy link
Contributor

Small refinement to PR #29447:

  1. Improved wording in a TODO comment in AnalyticLightNode.js.

  2. Removed unnecessary comments in NodeMaterial.js. First, the cameraNear/cameraFar nodes should be used, so the comment stating that they shouldn't be used is inaccurate. Second, the comment describing the float(1e27) bug now has its own issue report TSL: Using float(1e21) causes a shader syntax error, but uniform(1e21) does not #29560

  3. Removed unnecessary ".add( 1 ).div( 2 )" operations from the log depth calculation and added more detail to the log depth comments in ViewportDepthNode.js.

2. Removed unnecessary TODO in NodeMaterial.js.
3. Removed unnecessary ".add( 1 ).div( 2 )" from the log depth calculation and added more detail to the log depth comments in ViewportDepthNode.js.
Copy link

github-actions bot commented Oct 5, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 688.13
170.5
688.13
170.5
+0 B
+0 B
WebGPU 807.6
217.49
807.6
217.49
+8 B
+0 B
WebGPU Nodes 807.11
217.36
807.11
217.35
+8 B
-1 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 462.85
111.78
462.85
111.78
+0 B
+0 B
WebGPU 535.38
144.47
535.39
144.48
+8 B
+3 B
WebGPU Nodes 491.49
134.28
491.5
134.29
+8 B
+5 B

…thToLogarithmicDepth(), added Desmos link for logarithmic curve visualization.
…shifted to the left as cameraNear increases. Updated Desmos graph link.
@sunag sunag added this to the r170 milestone Oct 5, 2024
@sunag sunag changed the title Logarithmic Depth Refinement WebGPURenderer: Logarithmic Depth Refinement Oct 5, 2024
@sunag sunag merged commit af3a657 into mrdoob:dev Oct 6, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants