dtcristo / bevy_pixels

Bevy plugin that uses Pixels (a tiny pixel buffer) for rendering
https://docs.rs/bevy_pixels
Apache License 2.0
84 stars 12 forks source link

Is this usable with shaders? #17

Closed bayou-brogrammer closed 1 year ago

bayou-brogrammer commented 1 year ago

I am still new to shaders and the library Pixels, but currently I'm running my shader pipeline off the encoder from pixels.


let _ = pixels.render_with(|encoder, surface_texture, context| {
                    context
                        .scaling_renderer
                        .render(encoder, &post_process.texture1);

                    post_process.render(encoder, surface_texture);

Are we able to use shaders with this plugin?

dtcristo commented 1 year ago

Not yet. This library currently controls the render process without a way to override it. In the future I can allow the user to disable the default render system and define their own, this way you can add shaders like your example.

bayou-brogrammer commented 1 year ago

Appreciate the response! I'll be awaiting that feature :) thanks for your work on this

dtcristo commented 1 year ago

Hi @lecoqjacob, I've just released 0.10.0 and it adds a new default render cargo feature that controls the render system. Specify bevy_pixels = { version = "0.10", default_features = "false" } in your Cargo.toml to disable it.

See the custom_render example for how to specify your own render system. You should be able to configure any shaders you want here.