SFML community forums

Help => Graphics => Topic started by: soaup on January 08, 2016, 12:26:11 pm

Title: Global blur
Post by: soaup on January 08, 2016, 12:26:11 pm
Hello and sorry for bad english! I had tried implement blur on all game screen, to visualize game pause. For this i call RenderWindow::capture() by pressing key, and draw captured image. But capture() it takes too much time. And call window->draw(spritem &shader) for all objects it leads to the fact that all the sprites with blur look different. Please answer - how to make global blur?
Title: Re: Global blur
Post by: Rhimlock on January 08, 2016, 12:46:46 pm
Did you try to use a RenderTexture instead of capture?

Draw everything you have to a RenderTexture instead of a RenderWindow and then draw a Sprite with that RenderTexture and your blur.
Title: Re: Global blur
Post by: soaup on January 08, 2016, 01:08:00 pm
Yes! It works!! Thank you!!
Title: Re: Global blur
Post by: mkalex777 on January 20, 2016, 10:00:14 pm
Probably the better way to implement blur is shaders, it will looks much better with dynamic effects