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

Metal render pass error #21

Open
highway900 opened this issue May 26, 2023 · 1 comment
Open

Metal render pass error #21

highway900 opened this issue May 26, 2023 · 1 comment

Comments

@highway900
Copy link

I have setup a simple example of using infinite grid and the scene renders briefly then crashes. Here is the initialisation of the camera and grid during the menu stage, I am using PanOrbitCamera if that is of any consequence. The example ran from this repo works no problem, this led me to believe that it could be an ordering issue? but I am just guessing at this stage.

    commands
        .spawn(InfiniteGridBundle {
            grid: InfiniteGrid {
                ..Default::default()
            },
            ..Default::default()
        })
        .insert(GridShadowCamera);
    commands
        .spawn((
            Camera3dBundle {
                transform: Transform::from_xyz(0.0, 4.37, 14.77),
                ..Default::default()
            },
            PanOrbitCamera::default(),
        ))
        .insert(GameCamera);
Caused by:
    In a RenderPass
      note: encoder = `<CommandBuffer-(0, 8, Metal)>`
    In a set_pipeline command
      note: render pipeline = `grid-render-pipeline-shadowless`
    Render pipeline targets are incompatible with render pass
    Incompatible sample count: the renderpass expected 1 but was given 4
@highway900
Copy link
Author

Always the way, write an issue then find a solution. I just found this issue bevyengine/bevy#3254 and tried enabling MSAA and it fixed the problem. Not very obvious though.

In my case MSAA was explicitly off using .insert_resource(MSAA::off) removing this code fixed the issue. Not sure if this is metal specific, happy to provide a PR for the README wrt to this.

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

No branches or pull requests

1 participant