Change bevy_pbr::morph shader functions to use descriptor index (#24085)
# Objective The shader functions `bevy_pbr::morph` take an `instance_index` as a parameter and use it solely to look up the `morph_descriptor_index` in the `mesh` array. This prevents these functions from being used in an environment without instance indices and the mesh array available. This is closely related to #24083 and porting bevy_mod_outline to _0.19-dev_. I have put them in separate PRs because I consider #24083 a prerequisite to supporting morphed meshes without significant duplication both of code and work at runtime, and it is a very trivial change. I am in favour of this PR also, but if it is not merged for 0.19 then it is tractable to duplicate Bevy's morph shader functions inside bevy_mod_outline. ## Solution - Change the shader functions in bevy_pbr::morph take the descriptor index as a parameter instead of the instance index and to not bind the mesh array. ## Testing - Ran the morph_targets and many_morph_targets examples. --------- Co-authored-by: Greeble <166992735+greeble-dev@users.noreply.github.com> Co-authored-by: Carter Anderson <mcanders1@gmail.com>
R
Robin KAY committed
b6f35de0c7fa8753f1c0d588f621e27532fb6fb2
Parent: 0365671
Committed by GitHub <noreply@github.com>
on 5/21/2026, 1:53:57 PM