bevy
bevy copied to clipboard
post_processing shader example no longer works due to changed api of 'create_bind_group_layout'
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),
),
),
);```
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.
It sounds like you may have an older version of Bevy somewhere in your project's dependency tree.
I was indeed looking at the examples from the main branch, the 0.12 release branch works fine.