[SOLVED] blurring screen edges

Hi, how could I achieve an effect where the edges of the screen (view following the player) are blurred? So that you can see clearly the center, but the edges get blurrier.
Thanks in advance.
 

Joe Ellis

Member
You'd need to use a shader, and probably guassian blur, which is quite a simple and fast method. I'm not sure intirely about increasing the
blur based on how close it is to the edges, you might have to do a bit of experimenting.
These assets on the marketplace can start you off though on the standard guassian blur:
https://marketplace.yoyogames.com/assets/261/free-shaders
https://marketplace.yoyogames.com/assets/9540/blur-realtime-performance

The effect would probably be done by reducing the blur radius as it gets closer to the center of the screen.
The easiest way to do this would be to make a varying vec2 of the in_texcoord, then in the pixel shader measure it's distance from the center of the screen, vec2 (0.5).
That is if the blur is done as a fullscreen effect by drawing the application surface (which I'd recommend for a fullscreen shader effect)
 
Top