Skip to content

Conversation

@mvaligursky
Copy link
Contributor

  • batching chunk

@mvaligursky mvaligursky self-assigned this Apr 23, 2025
@mvaligursky mvaligursky added area: graphics Graphics related issue enhancement labels Apr 23, 2025
@mvaligursky mvaligursky requested review from a team and Copilot April 23, 2025 15:23
Copy link
Contributor

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.

Pull Request Overview

This PR adds WGSL support for skin batching by introducing a new shader chunk and integrating it into the shader module system.

  • Added a new WGSL shader chunk in skinBatch.js to compute bone matrices from a texture.
  • Updated the shader chunks registry to include the new skinBatch shader.
  • Made minor formatting adjustments in the WebGPU shader processor.

Reviewed Changes

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

File Description
src/scene/shader-lib/chunks-wgsl/common/vert/skinBatch.js Introduces the new WGSL shader chunk for skin batching.
src/scene/shader-lib/chunks-wgsl/chunks-wgsl.js Integrates the new shader chunk into the shader registry.
src/platform/graphics/webgpu/webgpu-shader-processor-wgsl.js Minor comment and formatting updates.
Comments suppressed due to low confidence (1)

src/scene/shader-lib/chunks-wgsl/common/vert/skinBatch.js:9

  • [nitpick] Consider extracting the magic number '3' into a named constant (e.g., BONEMATRIX_ROW_COUNT) to clarify its purpose and improve maintainability.
let index: i32 = i32(indexFloat + 0.5) * 3;

@mvaligursky mvaligursky changed the title WGSL support for batcing WGSL support for batching Apr 23, 2025
@mvaligursky mvaligursky merged commit 34df95e into main Apr 23, 2025
7 checks passed
@mvaligursky mvaligursky deleted the mv-batching-wgsl branch April 23, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants