Provides a slot in bevy_render to grabing screen texture for achieve blend mode or glass effect in bevy_sprite.
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
### What problem does this solve or what need does it fill?
As i me mentioned in discussions [Does bevy provide an API similar to unity's GrabPass?](https://github.com/bevyengine/bevy/discussions/16008), i need bevy to expose a slot in RenderCommand which can perform an additional operation before draw PhaseItem, in this way, I can grab the screen and achieve the blend mode effect in shader.
### What solution would you like?
I have initially implemented this slot and applied it to my own project, and it works fine.
The main changes are in [https://github.com/Ahuang0107/bevy/blob/elase/release-0.14.2/crates/bevy_render/src/render_phase/mod.rs line 770.](https://github.com/Ahuang0107/bevy/blob/9ab3f2a1232e7df743d02da587c6fd511096bab5/crates/bevy_render/src/render_phase/mod.rs#L770)
### Additional context
The reason why I am obsessed with implementing blend mode is because I need blend mode to express the glass effect, reflective effect, shadow effect and night and day effect. Unity has these functions but I prefer to use bevy to complete my game. The following is a comparison of my implementation in unity and bevy, blend mode can bring good effect to glass in 2d game.

Contributor guide
Assessment
This issue has not been assessed yet.