Asset - Shaders Realtime Gaussian Blur Shader & Pause Menu (GMS 1.4+ and GMS 2.3+)

FoxyOfJungle

Kazan Games


With only 1 shader it is possible to make the blur effect realtime, it is a Gaussian effect and does not use two pass blur. With the other shader, it is possible to have more control and several settings (suitable for the Pause Menu).
All code is fully customizable, and fully commented!





Scripts/Functions:

  • sprite_create_blur(sprite, downamount, width, height, blurradius, quality, directions);
  • sprite_draw_blur(blur_id, x, y);
  • sprite_blur_clear(blur_id);
  • draw_surface_blur(surface, x, y, w, h, downamount);


Examples:


- For realtime blur:


GML:
// Draw the surface part blurred (Draw GUI Event)
draw_surface_blur(application_surface, 10, 10, 300, 200, 0.3);

- For static blur (pause menu):

GML:
// Create a static blur from sprite (Create Event)
blurred_sprite = sprite_create_blur(sprite_or_screenshot, 16, width, height, 32, 8, 16);

// Draw the blur (Draw Event)
sprite_draw_blur(blurred_sprite, 0, 0);



Demonstration:



Pause with blurred background...............................................................Realtime gaussian blur

All support will be given to those who buy the content.
Thank you for getting here!


GET IT ON ITCH.IO (GMS 1.4+ and 2.3+) | Foxy Of Jungle (Get more amazing assets!)
GET IT ON YOYOGAMES MARKETPLACE (GMS 2.3+ only)



KazanGames_White2.png
 
Last edited:
Top