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

Globals binding not available in vertex shader. #12015

Closed
Jessie8Bit opened this issue Feb 20, 2024 · 5 comments · Fixed by #12032
Closed

Globals binding not available in vertex shader. #12015

Jessie8Bit opened this issue Feb 20, 2024 · 5 comments · Fixed by #12032
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior

Comments

@Jessie8Bit
Copy link

Bevy version

0.13

What you did

Attempt to update a shader to bevy 0.13 and use: "mesh_view_bindings::globals.time" in my vertex shader.

What went wrong

Caused by:
In Device::create_render_pipeline
note: label = 'premultiplied_alpha_mesh_pipeline'
Error matching ShaderStages(VERTEX) shader requirements against the pipeline
Shader global ResourceBinding { group: 0, binding: 9 } is not available in the pipeline layout
Visibility flags don't include the shader stage

@Jessie8Bit Jessie8Bit added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Feb 20, 2024
@BD103 BD103 added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Feb 20, 2024
@JMS55
Copy link
Contributor

JMS55 commented Feb 20, 2024

What kind of shader is this? Material, Material2d, UiMaterial, or something else?

@Jessie8Bit
Copy link
Author

Material with custom vertex shader for water waves

@platlas
Copy link

platlas commented Feb 21, 2024

I had similar issue, but instead of VERTEX error was for FRAGMENT. It was related to: #10485. I forgot to change bind group to 2. Could it be relevant here as well?

@Jessie8Bit
Copy link
Author

I just imported mesh_view_bindings::globals.time, but it said it was not available in "premultiplied_alpha_mesh_pipeline" vertex.

is it because of this or are globals available on an other binding for "premultiplied_alpha_mesh_pipeline"?

@IceSentry
Copy link
Contributor

Sorry, I missed a visibility modifier when introducing the bind group layout entries feature. Here's the fix #12032

github-merge-queue bot pushed a commit that referenced this issue Feb 21, 2024
# Objective

- Globals are supposed to be available in vertex shader but that was
mistakenly removed in 0.13

## Solution

- Configure the visibility of the globals correctly

Fixes #12015
ameknite pushed a commit to ameknite/bevy that referenced this issue Feb 22, 2024
# Objective

- Globals are supposed to be available in vertex shader but that was
mistakenly removed in 0.13

## Solution

- Configure the visibility of the globals correctly

Fixes bevyengine#12015
msvbg pushed a commit to msvbg/bevy that referenced this issue Feb 26, 2024
# Objective

- Globals are supposed to be available in vertex shader but that was
mistakenly removed in 0.13

## Solution

- Configure the visibility of the globals correctly

Fixes bevyengine#12015
msvbg pushed a commit to msvbg/bevy that referenced this issue Feb 26, 2024
# Objective

- Globals are supposed to be available in vertex shader but that was
mistakenly removed in 0.13

## Solution

- Configure the visibility of the globals correctly

Fixes bevyengine#12015
mockersf pushed a commit that referenced this issue Feb 27, 2024
# Objective

- Globals are supposed to be available in vertex shader but that was
mistakenly removed in 0.13

## Solution

- Configure the visibility of the globals correctly

Fixes #12015
Lethja added a commit to Lethja/bevy_transform_gizmo that referenced this issue Mar 10, 2024
aevyrie added a commit to ForesightMiningSoftwareCorporation/bevy_transform_gizmo that referenced this issue Apr 6, 2024
* Updated Cargo.toml for Bevy 0.13

* Successfully compiled library and examples

* Replaced deprecated structs

* Bumped minimum Bevy version requirement to 0.13.1 (bevyengine/bevy#12015)

* Fixed plane scale

* Fixed strict formatting error

* Fixed strict clippy warnings

* Fix shader bind group as noted in Bevy PR #10485

* Minor nits and cleanup.

---------

Co-authored-by: Zach Bateman <zkbateman@gmail.com>
Co-authored-by: Aevyrie <aevyrie@gmail.com>
crabdancing pushed a commit to Exobody/bevy_transform_gizmo that referenced this issue Apr 29, 2024
* Updated Cargo.toml for Bevy 0.13

* Successfully compiled library and examples

* Replaced deprecated structs

* Bumped minimum Bevy version requirement to 0.13.1 (bevyengine/bevy#12015)

* Fixed plane scale

* Fixed strict formatting error

* Fixed strict clippy warnings

* Fix shader bind group as noted in Bevy PR #10485

* Minor nits and cleanup.

---------

Co-authored-by: Zach Bateman <zkbateman@gmail.com>
Co-authored-by: Aevyrie <aevyrie@gmail.com>
NiseVoid pushed a commit to NiseVoid/bevy that referenced this issue Jul 8, 2024
# Objective

- Globals are supposed to be available in vertex shader but that was
mistakenly removed in 0.13

## Solution

- Configure the visibility of the globals correctly

Fixes bevyengine#12015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants