Jump to content
  • Advertisement
Sign in to follow this  
Boruki

Motion Blur + Velocity Buffer

This topic is 3704 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

Hi guys. I'm currently playing around with motion blur at the moment and I'm getting really odd blurring. I decided to look at what was being sent to the shader as the velocity buffer and it just appeared to be a depth-incorrect render of the scene. I was wondering if anyone could post a picture of what their velocity buffer looks like, cause I'm just struggling to get my head around it right now. Any help would be great :). (I've been looking at nVidia and Microsoft's demos as well as Sylphis for ideas on this, but I'm having huge mental blocks).

Share this post


Link to post
Share on other sites
Advertisement
I don't have any pictures with me to show, but basically it should look black with any moving objects being rendered as red, green, or yellowish (actually some moving objects will also show up as black, if their X and Y velocities are both negative). Red would indicate that the object is moving in the positive X direction, green would indicate it's moving in the positing Y direction, and yellow would indicate that it's moving in both the positive X and Y directions.

If you want, go ahead and post some of your shader code for rendering the velocity and I'll tell you if I see anything that doesn't look quite right.

Share this post


Link to post
Share on other sites
You know what? I don't think the shader is even being run. I set gl_FragColor to a mid gray for every pixel being passed, and it still gives me a depth incorrect (maybe reverse ordered) image. No idea why not, it compiles fine. Thanks for the input though, atleast I'll know I'm getting something almost correct when I get it.

Share this post


Link to post
Share on other sites
Having just figured out what I was doing wrong I'll just say this:

If you want to parse everything you're going to render through a shader (ie a velocity calculation shader) make sure you don't turn on other shaders while rendering that stuff for it. I'm a dumbarse.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!