Jul 30, 2009

screen space motion blur

I don`t know how to implement motion blur in general method. In the sample of d3d9, the document said that it renders each object many times before one present call. And d3d10 implement them by geometry shader. I`m lazy and wanna try GLSL in my Mac. So I made a simple demo to show motion blur in screen space. The general scene with 16 ugly water mellon :

Blurred in screen space :
You need 2 new render targets, let`s call them A & B. Blend your scene on A, then alpha blend B on A. After that, blend A to back buffer then switch A & B. It`s pretty simple since you don`t even need GLSL (if you can alpha blend in fix function pipeline). The alpha value used in the screen shot is 0.9. But there are some troubles in this method when the moving object overlapped in screen space......I guess you can image it, so there is no screenshot here :)

No comments: