Skip to content
Discussion options

You must be logged in to vote

So I found a solution that worked for me:

Create an Image with as many pixels as entities there shall be. Create one material with the image's handle used as the emissive or base-color texture. UV map the mesh of every single entity to one pixel in the image.
In the update method I write new data into the image-data array. For this change to be applied, the Material must be updated. So to access the image, the most straight-forward way is to get_mut() the Material and use the relevant texture-member. The get_mut() triggers a material update (only one, not 4096 as in my original approach).

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by M3gaFr3ak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant