Blur/Glow shader (Part 1)

Published May 21, 2006
Advertisement
This will hopefully be the final effect I gotta add into the game. It will add a blur/glow effect into the scene. I'm using a few 256x256 textures to generate the glow/blurred parts of the scene and then upsampling them to the screen resolution. Standard stuff based off the famous "Tron 2.0" glow paper on Gamasutra that everyone has read by now.

Interestingly enough I havn't added the blur parts to the shader yet, the upsampling provides enough filtering to provide a small blur, and it already looks pretty damn good IMO. It sort of provides a fake HDR look by using additive blending. I'm going to use the previous frame's glow texture to simulate a motion blur as well.

I can't stand even looking at old screenshots after seeing this lol. It already looks so much better, and once I get the blurring in there it'll look fantastic.

These screenshots are still a heavy work in progress I gotta adjust the exposure, and add the blur, and do a few other things...but wow I think it already looks so much better than before!

Just scroll down to a previous entry if you want to be amazed at how much this effect adds to a scene.

//I want to drive that car. Grrrrowl. I love this screenshot.


//*Insert illegal immigrant joke here* I really like the reflections on the glass in the background.


//I miiiight have to tone down the exposure value a little bit.


//The effect is more subtle in this shot.


//I tried for so long to get a great shot of this scene, this is the best I could do. It looks so much better in motion.
*Note the increased 'bling' on his chain. Interesting.


I'm about to start working on a virtual showroom for you to buy cars from, and have them delivered to your HQ. This should be interesting. It'll provide a nice break from shader work. *shudders* Just kiddin' I like writing shaders.

- Dan
0 likes 12 comments

Comments

Laz
That actually looks frickin hot! Good job.
May 21, 2006 11:19 PM
Daerax
I'm so excited, I just can't hide it,
I'm about to lose control and I think I like it.
May 21, 2006 11:24 PM
dgreen02
I'm sorry Daerax. I had to ban posting of '80s music lyrics in my journal ever since the whole "Boy George" incident a few months ago. I hope you understand.

- Dan
May 21, 2006 11:36 PM
Prinz Eugn
What!? And forget the timelessness of "You spin me right round baby right round -like a record baby, round, round, round, round"?

Preposterousness, I say!
May 22, 2006 12:00 AM
Dorvo
Holy hell!
The bloom effect makes the game look just that much more amazing!
What kind of framerate are you getting with that?
May 22, 2006 12:26 AM
Rob Loach
Shaders really make quite the difference....
May 22, 2006 01:01 AM
jollyjeffers
I'm a little sick of HDRI stuff at the moment (been working on various algorithms for months now [lol]), but that does look pretty sweet.

Are you doing tone-mapping or just lens effects? You only mention the classic bloom to start with, but one of your screenshots mentions exposure...?

One of the big things I noticed about having proper exposure settings (especially if you use an operator that can auto-adjust) is the way it will "fade in" when you move around the 3D world. I suppose in your example you could turn a corner into a dark alley and it'd slowly become the correct exposure - can look very cool [grin]

One other thing... what sort of performance hit did you see from implementing this?

Cheers,
Jack
May 22, 2006 06:36 AM
Gaheris
Dude, that really adds the polish making the game look AAA. Great stuff indeed, shaders rock. :)
May 22, 2006 07:58 AM
Nit
Simply amazing.
May 22, 2006 11:27 AM
roel
Very very nice!
May 22, 2006 01:29 PM
dgreen02
Hey guys, thanks for the responses!

jollyjeffers - I'm not doing anything using HDR lighting, though it is simulated by rendering the glow/blur texture several times using additive blending. I'm just doing a standard bloom effect right now, by exposure I was referring to the % that I fade the glow texture into the scene, right now it's at about a 40% increase. I need to look into a way to make it fade automatically, that will add a lot to it.

Suprisingly I have not had ANY performance hit, I still have to add the blur parts to the shader, but it really hasn't caused any performance slow down at this point. I'm using StretchRect to get the scene into a 256x256 texture then I do the horizontal and vertical blurring in two seperate steps into 2 other 256x256 textures (in these screens, the shader it just copies them with filtering), then I render those two textures over the scene additivly, with a damper value (exposure).

I still get 30FPS at 1024x768 with 2X FSAA. I clamp the FPS at 30.

I'll hopefully have the effect looking even better by the end of today.

- Dan
May 22, 2006 01:56 PM
ildave1
Amazing progress Dan. Keep up the great work!
May 22, 2006 03:36 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement