mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 12:44:11 -10:00
A <Material>'s textures may give one list of 1 to 16 pictures, bound as the source's binding_array<texture_2d<f32>> (ui_bind's ARRAY slot, binding 57). Bevy's AsBindGroup derive can't own an array of views, so a new OwnArrayMaterial (systems/shader/src/own_array.rs) wraps the part's OwnMaterial and builds its bind group directly, as Bevy's example does: the derived entries, then the array with the fallback image past the list. Its layout leaves out the uniform buffers, because wgpu refuses a binding array beside one, so build refuses uniforms on such a source. Its pipelines are OwnMaterial's (same key, specialize), and own_live patches it too. A source with no texture_2d of its own samples with the first sampler, which becomes the list's first picture's. 2D and devices without texture binding arrays are refused. The depth and picture helpers move to own_images.rs (own.rs stays under 500 lines). The port is exact at frames 5 and 10. Two tiles swapped and linear filtering each still passed the 0.99 bar (0.992, 0.990); a missing tile failed it.