Jump to content
  • Advertisement
  • entries
    316
  • comments
    485
  • views
    324146

Point Sampling vs. Bilinear Sampling

Sign in to follow this  
Jason Z

2221 views

Texture Sampling
I thought I would make a quick post to show the different between my point sampling implementation and my bilinear sampling implementation. Its really more to justify the difference for myself, because the performance difference between the two is just ridiculous. I have many optimizations to figure out...

Anyway, here is the image with point sampling at 320x240:



And here is the one with bilinear sampling at the same resolution:



They are both necesary sampling modes to support, but I think it is important to know when they are both useful. Point sampling is pretty much only used for post processing type of operations where you want one pixel to line up with one texel. Other cases are when you actually only want the influence of a single texel on your sampled color, such as when performing a filtering operation with a given filter kernel.

Bilinear sampling is good for situations where a single texel maps to more than one onscreen pixel. It helps to blur the transitions between colors in the textures that you are sampling. There are also other cases to use it, specifically in post processing as well. It is pretty common for people to use the bilinear filtering capabilities of the GPU to speed up the computation of a post processing kernel. Each bilinear sample uses the 4 closest texels to influence its output color, so if done properly, you can use fewer samples in your pixel shader programs to get the same end result than you would if you used point sampling.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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!