[HOpenGL] motion blur effect in HOpenGL
Alexander Göransson
alexander.goransson at gmail.com
Sun Feb 27 07:32:11 CET 2011
How advanced do you want to do this?
The easiest way is to cheat and use (accumulation?)-buffers. Remember
the last rendered frame and have it sort of transparent on top of the
next. This will create ghosting artifacts (you'll see clear edges of
where a moving object has been at each rendering pass).
A bit more advanced is a technique where you use your previous frames
model-view-matrix for reversing this framses coordinates and have a
fragment shader that calculates how much each point has moved through
space since the last update. This technique only works when your
camera actually moves through the world. So if you have a stationary
camera and a fast object flying by, nothing happends (but it's
probably enough for any car game or similar). Look in "GPU Gems 3" for
how to implement this.
Finally you can write velocity buffers where you keep track of all
visible points velocities and use this for motion blurring. This is
probably the most complicated technique but also the one that's the
most "correct". Some googling will probably help you find what you
need for this.
good luck!
// Alexander
2011/2/25 er9999 <er9999 at 126.com>:
> Hello,
> Can anyone give me an example or tell me where I can find some tutorials
> about how to make motion blur for an object in HOpenGL? Thanks!
> -- Yu
>
>
> _______________________________________________
> HOpenGL mailing list
> HOpenGL at haskell.org
> http://www.haskell.org/mailman/listinfo/hopengl
>
>
More information about the HOpenGL
mailing list