bevy icon indicating copy to clipboard operation
bevy copied to clipboard

post_processing shader example no longer works due to changed api of 'create_bind_group_layout'

Open royalmustard opened this issue 1 year ago • 3 comments

Bevy version

0.12

What you did

The following snippet no longer compiles because the api seems to have changed. Notably, the struct BindGroupLayoutEntries seems to be missing completely.

let layout = render_device.create_bind_group_layout(
            "post_process_bind_group_layout",
            &BindGroupLayoutEntries::sequential(
                // The layout entries will only be visible in the fragment stage
                ShaderStages::FRAGMENT,
                (
                    // The screen texture
                    texture_2d(TextureSampleType::Float { filterable: true }),
                    // The sampler that will be used to sample the screen texture
                    sampler(SamplerBindingType::Filtering),
                    // The settings uniform that will control the effect
                    uniform_buffer::<PostProcessSettings>(false),
                ),
            ),
        );```

royalmustard avatar Feb 07 '24 15:02 royalmustard

Are you looking at the examples at the 0.12.1 tag? The code you copied here doesn't appear in that example at this tag.

The examples shown by default on the repo are from main: they're kept up to date as PRs change and so will have breaking changes that are not yet released.

alice-i-cecile avatar Feb 07 '24 15:02 alice-i-cecile

It sounds like you may have an older version of Bevy somewhere in your project's dependency tree.

rparrett avatar Feb 07 '24 15:02 rparrett

I was indeed looking at the examples from the main branch, the 0.12 release branch works fine.

royalmustard avatar Feb 08 '24 08:02 royalmustard