SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
222 stars 18 forks source link

Support blurring behind elements #101

Open LPGhatguy opened 10 months ago

LPGhatguy commented 10 months ago

In our game, we want to have transparent UI with a frosted glass effect. An easy way to do that is to let the user supply a pre-blurred fullscreen texture that yakui can sample.

coderedart commented 10 months ago

This will work for containers which are drawn over the game/background. But what if the container is positioned "above" another yakui container?

LPGhatguy commented 10 months ago

This will work for containers which are drawn over the game/background. But what if the container is positioned "above" another yakui container?

That's a good question! That starts to involve a lot more complicated compositing. For the game I'm working on right now, it's not a big deal to omit this, but we should think about how we'd support this for layered UI.

It's possible that the new Layer API I introduced could be of help here.