Skip to content

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Nov 26, 2025

Related issue: #32303 #32365

Description

Refactors point light shadows from the 2D texture atlas approach (with cubeToUV mapping) to using native cube depth textures.

Changes

  • Replace 2D atlas viewport layout with native CubeDepthTexture rendering
  • Remove cubeToUV helper and viewport calculations
  • Add cubeDepthTexture type support to node builders
  • Add samplerCubeShadow (GLSL) and texture_depth_cube (WGSL) shader types
  • Update CubeTextureNode UV handling for depth texture sampling
  • Add cube face framebuffer binding in WebGL backend

Works on both WebGPU and WebGL backends.

(Made using Claude Code with Opus 4.5)

@mrdoob mrdoob added this to the r182 milestone Nov 26, 2025
@github-actions
Copy link

github-actions bot commented Nov 26, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 350.29
83.05
350.29
83.05
+0 B
+0 B
WebGPU 612.89
170.29
613.1
170.13
+210 B
-165 B
WebGPU Nodes 611.49
170.01
611.7
169.85
+210 B
-156 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 482.23
117.82
482.23
117.82
+0 B
+0 B
WebGPU 683.78
186
684.25
185.94
+470 B
-55 B
WebGPU Nodes 633.61
173.18
634.08
173.15
+470 B
-36 B

@mrdoob mrdoob force-pushed the webgpu-pointshadow branch from cf09c8a to b860f38 Compare November 26, 2025 15:26
@mrdoob mrdoob force-pushed the webgpu-pointshadow branch from b860f38 to 9e4573d Compare November 26, 2025 15:41
@mrdoob mrdoob merged commit 77ebf27 into dev Nov 26, 2025
10 checks passed
@mrdoob mrdoob deleted the webgpu-pointshadow branch November 26, 2025 17:13
@mrdoob
Copy link
Owner Author

mrdoob commented Nov 26, 2025

@sunag Let me know if you want me to do any changes.

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.

4 participants