#Is it possible to alter image's pixel colors?
11 messages · Page 1 of 1 (latest)
Image.try_into_dynamic returns a DynamicImage from the rust image crate. Should be able to convert that to an image buffer and use that to set pixels like this example https://docs.rs/image/latest/image/struct.ImageBuffer.html#examples
You'll have to then save to image back into the bevy asset.
Note that I wouldn't call this simple for a beginner, doable though. Might be able to find a crate that makes this easier.
If you are instead wanting a post processing shader there's an examplehttps://github.com/bevyengine/bevy/blob/main/examples/shader/post_processing.rs
If you want to only want to draw pixels that you have full control of on the CPU (not in a shader) there's https://crates.io/crates/bevy_pixels
You can just edit the pixel data in an Image directly, like I do here: https://github.com/grunnt/falling-rust/blob/master/src/render.rs
That's cool, but it is CPU
Ah ofcourse, sorry
Turns out having GPU-side computing sand physics is utterly complicated :D
I am joining the CPU side now