bevy_hanabi icon indicating copy to clipboard operation
bevy_hanabi copied to clipboard

Put spawners into an array in the shader instead of using dynamic offsets.

Open pcwalton opened this issue 9 months ago • 1 comments

Currently, we use a dynamic offset to point to the Spawner. This prevents batching, so this PR changes the shaders so that the effect metadata contains an index to the spawner, and the shader picks the spawner out of an array.

This is built on top of https://github.com/djeedai/bevy_hanabi/pull/480, so only the last commit (61c205f) needs to be reviewed.

pcwalton avatar Jul 04 '25 00:07 pcwalton

I'm not sure why formatting is failing; it seems to be that perhaps the linter was upgraded?

pcwalton avatar Jul 04 '25 00:07 pcwalton