Jump to content
  • Advertisement
  • entries
  • comments
  • views

Blur/Glow shader (Part 1)

Sign in to follow this  


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
Sign in to follow this  


Recommended Comments

I'm so excited, I just can't hide it,
I'm about to lose control and I think I like it.

Share this comment

Link to comment
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

Share this comment

Link to comment
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!

Share this comment

Link to comment
Holy hell!
The bloom effect makes the game look just that much more amazing!
What kind of framerate are you getting with that?

Share this comment

Link to comment
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?


Share this comment

Link to comment
Dude, that really adds the polish making the game look AAA. Great stuff indeed, shaders rock. :)

Share this comment

Link to comment
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

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!