Jump to content
  • Advertisement
Sign in to follow this  
SquareDanceSteve

Motion Blur Pixel Shader

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

Motion Blur Pixel Shader. I made a 2d top down space shooting game, parallax star mapping is achieved through scrolling of multiple layers of sprites containing alpha mapped star patterns. My ship reaches incredible speeds. How would I go about writing a pixel shader that will apply a motion blur to the to the stars in the background ?

Share this post


Link to post
Share on other sites
Advertisement
don't need a pixel shader,

you just draw lines instead of points so that the stars seem to go very fast.

line length in pixels = time between frames in milliseconds * velocity in pixels per millisecond.

You can do a textured quad instead of a "line" if you want your stars to be textured of course.

Share this post


Link to post
Share on other sites
If you go to ATIs website and download RenderMonkey, they have a shader that does motion blur that comes packaged.

Share this post


Link to post
Share on other sites
Quote:
Original post by SquareDanceSteve
Say i am running at 1024x768 resolution

say I have a star for every 1024 pixels, thats 768 stars.
1 star for every 32x32 pixel blocks

and thats 768 render calls per frame.


Of course not, you don't need one draw call per star.
You can draw all your stars in one draw call with batching.

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!