bevyengine / bevyengine/bevy-website
0.12 Migration: Reduce the size of MeshUniform section shader code is broken
- Dominant language
- JavaScript
- Stars
- 249
- Forks
- 450
- Avg merge
- 16h 20m
- Merged PRs (30d)
- 6
Description
`affine_to_square` isn't even in `mesh_functions` anymore. It was moved in https://github.com/bevyengine/bevy/pull/9597.
But also, it seems that you want to use `mesh_functions::get_model_matrix` for this now instead, due to it handling the details of some workaround for some DX12 bug.
Relevant bit of the migration guide:
https://github.com/bevyengine/bevy-website/blob/bf681add34a6c2351674afa29cf6859fe71e2317/content/learn/migration-guides/0.11-0.12/_index.md?plain=1#L923-L933
Relevant text from Discord:
> robswain — Today at 7:11 AM
> yes. i'd recommend doing what mesh.wgsl does (if i'm remembering the correct file)
> robswain — Today at 7:12 AM
> https://github.com/bevyengine/bevy/blob/4852fc7578b7a55db4c05a6fb9f8ebdd290571e1/crates/bevy_pbr/src/render/mesh.wgsl#L46
> https://github.com/bevyengine/bevy/blob/4852fc7578b7a55db4c05a6fb9f8ebdd290571e1/crates/bevy_pbr/src/render/mesh_functions.wgsl#L15
> robswain — Today at 7:27 AM
> and if you want to see a bit more about what the problem with instance index is, there's a comment here: https://github.com/bevyengine/bevy/blob/main/crates/bevy_render/src/instance_index.wgsl
> get_model_matrix was to abstract that away and give people something simpler to use
`mesh[vertex.instance_index].model` seems to show up elsewhere in the migration guide as well...
Contributor guide
Assessment
This issue has not been assessed yet.