Skip to content

Rendering issue with multiple meshes having same material with WebGPURenderer #17

Open
@titouan-pellerin

Description

When applying the same Material to multiple Meshes using WebGPURenderer, only one mesh is visible at a time. As I rotate the camera, the visibility swaps between the two meshes—one disappears while the other appears.

Image

Steps to Reproduce

  1. Create a Geometry and a Material.
  2. Apply the same Material to two different Mesh instances.
  3. Add both Mesh instances to the Scene.
  4. Rotate the camera around using OrbitControls.

Expected Behavior

Both meshes should be visible simultaneously and render independently.

Actual Behavior

Only one mesh is visible at a time. When rotating the camera, the visibility swaps between the meshes—one disappears while the other appears.

Additional Info

  • Using WebGPURenderer from four.
  • Issue occurs even with a simple shader.
  • If each mesh gets a unique Material instance, both render correctly.
  • Can't reproduce using WebGLRenderer
  • Could be related to how WebGPURenderer handles material binding per draw call

Reproduction

See reproduction here

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions