Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Request - Gaussian Blur

Author
Message
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 12th Feb 2016 15:00
Does anyone have a simple gaussian blur routine they'd be willing to share? Ideally something along the lines of:
blurred-image = blur(source-image, blur-amount)

A shader option would be fine too (as long as it comes with a usage example ).

Thanks!
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 13th Feb 2016 12:39
I thought this would be a popular one! Oh well. I'll have some time to do this tonight. I'll post up the function when I'm done.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 13th Feb 2016 20:05 Edited at: 13th Feb 2016 20:18
Hi,
I knew i have one laying around somewhere.
For more "Bluriness" play with the blurSizeH/V

Radial Blur

Normal Blur

AGK


There is also a way to blur it horizontal and then vertical...

Using AGKv2 Tier1
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 14th Feb 2016 10:05
Thanks Janbo! These are cool little blur shaders and go a long way to helping my understanding of shaders!

I've modified slightly to accept a blur size parameter from AppGameKit (don't use these if you need to blur Horizontal or Verticle independantly! - Use Janbo's versions above).

Normal:



Radial:


Usage example:

(you'll need to provide your own background.png image)

I'll still post up my non-shader memblock gaussian blur when I'm finished for those who may be interested.

V2 T1 (Mostly)
Phone Tap!
Uzmadesign

Login to post a reply

Server time is: 2024-05-07 06:52:56
Your offset time is: 2024-05-07 06:52:56