Skip to content

Using OIT and gizmos together panics #17945

@mweatherley

Description

@mweatherley

Bevy version

0.15.1 and main

Relevant system information

This is probably not relevant, but included for posterity.

AdapterInfo { name: "Apple M4", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }

What you did

Used OIT and gizmos at the same time. Specifically, rendering gizmos on a camera with OrderIndependentTransparencySettings is what causes the problem.

What went wrong

wgpu error: Validation Error

Caused by:
  In RenderPass::end
    In a draw command, kind: Draw
      The BindGroupLayout with 'mesh_view_layout_oit' label of current set BindGroup with 'mesh_view_bind_group' label at index 0 is not compatible with the corresponding BindGroupLayout with 'mesh_view_layout' label of RenderPipeline with 'LineGizmo 3d Pipeline' label
        Assigned entry with binding 34 not found in expected bind group layout
        Assigned entry with binding 35 not found in expected bind group layout
        Assigned entry with binding 36 not found in expected bind group layout

I'm pretty sure this is just caused by the 3d gizmo pipeline not adjusting its mesh pipeline key when the extracted view has OrderIndependentTransparencySettings.

I'm happy to fix this myself :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorP-CrashA sudden unexpected crash

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions