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: Fix DepthTexture if used compatibilityMode:true #30869

Merged
merged 1 commit into from
Apr 5, 2025

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Apr 5, 2025

Related issue: #30725

Description

Fix DepthTexture if used compatibilityMode:true.

@sunag sunag requested a review from Copilot April 5, 2025 02:24
@sunag sunag added this to the r176 milestone Apr 5, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

src/renderers/webgpu/utils/WebGPUBindingUtils.js:106

  • Using 'GPUSamplerBindingType.NonFiltering' in compatibility mode differs from the default behavior. Please verify that this new assignment correctly matches the platform's expected sampling behavior.
else if ( backend.compatibilityMode ) {

src/renderers/webgpu/nodes/WGSLNodeBuilder.js:551

  • Appending '.x' to the texture load result assumes a vector type output; confirm that this manipulation is valid for all depth texture cases under compatibility mode.
if ( this.renderer.backend.compatibilityMode && texture.isDepthTexture ) {

src/renderers/webgpu/nodes/WGSLNodeBuilder.js:1674

  • The reassignment of the texture type to 'texture${ multisampled }_2d' when compareFunction is null may affect depth sampling behavior; please ensure this change is consistent with the intended WGSL semantics.
if ( this.renderer.backend.compatibilityMode && texture.compareFunction === null ) {

Copy link

github-actions bot commented Apr 5, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.44
78.37
336.44
78.37
+0 B
+0 B
WebGPU 541.67
150.04
541.97
150.12
+300 B
+80 B
WebGPU Nodes 541.14
149.93
541.44
150.01
+300 B
+79 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.37
112.21
465.37
112.21
+0 B
+0 B
WebGPU 614.51
166.09
614.81
166.16
+300 B
+76 B
WebGPU Nodes 569.5
155.49
569.8
155.56
+300 B
+78 B

@sunag sunag marked this pull request as ready for review April 5, 2025 02:28
@sunag sunag merged commit 142144a into mrdoob:dev Apr 5, 2025
12 checks passed
@sunag sunag deleted the dev-cmode-depth branch April 5, 2025 02:39
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.

1 participant