I would like to calculate lighting per vertex instead of per fragment, but I can't access bevy_pbr::mesh_view_bindings::lights or bevy_pbr::ambient::ambient_light in the vertex stage of my shader.
I think I need to modify the entries of MeshPipelineViewLayout by adding VERTEX visibility to the GpuLights uniform buffer. layout_entries is used to configure everything and it's only used in FromWorld for MeshViewPipelineLayouts (generate_view_layouts is never used?).
I tried inserting MeshPipelineViewLayouts in my plugin's finish to replace the one inserted by the MeshRenderPlugin, but that didn't work.
I forked bevy, tried doing exactly that, and got my shader working, but that's not ideal.
Do I need to make my own pipeline or is there an easy way to do this?
API documentation for the Rust MeshPipelineViewLayout struct in crate bevy.
Stores the view layouts for every combination of pipeline keys.
Source of the Rust file src/render/mesh_view_bindings.rs.
Source of the Rust file src/render/mesh.rs.