Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Global blur  (Read 1948 times)

0 Members and 1 Guest are viewing this topic.

soaup

  • Newbie
  • *
  • Posts: 5
    • View Profile
Global blur
« 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?

Rhimlock

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Global blur
« Reply #1 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.

soaup

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Global blur
« Reply #2 on: January 08, 2016, 01:08:00 pm »
Yes! It works!! Thank you!!

mkalex777

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: Global blur
« Reply #3 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