Sign in to follow this  
Lord Faron

Radial blur

Recommended Posts

hello,
use alphablend and draw your texture multiple times . . .

for radial blur, just rotate your textured quad around a point.
for zoom blur, just scale your textured quad around a point.

if you understand blending, you have your effect :)

JFD

Share this post


Link to post
Share on other sites
just from the top of my head, jou could go with the scaling and blending technique, and also map an intentsity map over each blur-pass.
By intensity map i mean something like a colormap containing a gradient which is white at the center and fades to black. This would mean to the blur, that wherever the map fades, the blurred image gets through better (to the sides, so blurring more)


oh, and also, nehe has a radial blur tutorial, if I remember correctly (lesson 36).

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord Faron
Well it's not that simple. Radial blur assumes more blur further away form the center. Scaling and rednering multiple times will give the same blur amount in every point.


The scaling method works perfectly well - if you scale from the center of the screen this automagically gives you more blur further away from the center. Theres a simple implementation in one of the NeHe demos if you want some code to look at.

Share this post


Link to post
Share on other sites
The quality is highly dependant on the number of passes you use when drawing the scaled version to the framebuffer. Using too few will show obvious banding like in DMINATOR's screenshot. You'll want to find a balance between quality and fillrate used.

Share this post


Link to post
Share on other sites
I think using fragment shader in a single pass would be better. I've came up with something like this:

First calculate distance forum the center of the screen in 0..1. Multiply it by the number of maximum samples (or blur amount or whatever you call it). Then use for loop to sample source texture (screen) using a larger offset form the center in each iteration and store the results.

I don't know if this is correct or not. Haven't tried it yet but I think it will give better results then scaling and blending a texture multiple times.

Share this post


Link to post
Share on other sites

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

Sign in to follow this