You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the generated rust bindings, there's a generated VERTEX_ATTRIBUTES and vertex_buffer_layout for VertexInput, but not for InstanceInput. Also, their _vertex_shader_entrys are the same, even though dummy_instanced_vertex_shader should have 2 inputs instead of one:
If I move dummy_instanced_vertex_shader to be before dummy_vertex_shader in that file, I then get a VERTEX_ATTRIBUTES and vertex_buffer_layout for both VertexInput and InstanceInput. However, now dummy_vertex_shader_entry is incorrect:
So it seems like wgsl_bindgen assumes that every vertex shader in a file shares the same input as the first vertex shader.
The text was updated successfully, but these errors were encountered:
Gonkalbell
changed the title
All
All vertex shaders in a file assume they have the same inputs
Aug 22, 2024
Gonkalbell
changed the title
All vertex shaders in a file assume they have the same inputs
Rust bindings assume all vertex shaders in a file have the same input, even if they don't
Aug 22, 2024
I have a file with multiple vertex shaders, like this:
In the generated rust bindings, there's a generated
VERTEX_ATTRIBUTES
andvertex_buffer_layout
forVertexInput
, but not forInstanceInput
. Also, their_vertex_shader_entry
s are the same, even thoughdummy_instanced_vertex_shader
should have 2 inputs instead of one:If I move
dummy_instanced_vertex_shader
to be beforedummy_vertex_shader
in that file, I then get aVERTEX_ATTRIBUTES
andvertex_buffer_layout
for bothVertexInput
andInstanceInput
. However, nowdummy_vertex_shader_entry
is incorrect:So it seems like
wgsl_bindgen
assumes that every vertex shader in a file shares the same input as the first vertex shader.The text was updated successfully, but these errors were encountered: