• Advertisement
Sign in to follow this  

Radial blur

This topic is 4177 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to create radial blur postprocessing effect. Can somebody point to an exaple of how to do it? I want to process single texture with shaders. I can't find any example pixel shader fo it.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
up...

Share this post


Link to post
Share on other sites
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
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.

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

  • Advertisement