the difference between linear & point filter

Discussion in 'Rendering Technology and APIs' started by shuipi, Jun 17, 2009.

  1. shuipi

    Newcomer

    Joined:
    Mar 16, 2004
    Messages:
    73
    Likes Received:
    0
    Location:
    Beijing, China
    When doing full screen post effects, if the size of the texture and the size of the render target match, using linear and point filter for the texture should be the same, however, is this only true when you are sampling the exact center of the texels (like Gaussian Blur or plain averge)? How about when doing something like Poisson Blur where the random sample points are not necessarily on the center of the texel? Does linear filter make a difference in this case, even though the texel/pixel ratio is still 1:1?
     
  2. ProsperLOADED

    Newcomer

    Joined:
    Jan 16, 2008
    Messages:
    13
    Likes Received:
    0
    Yes. If you sample a value between two pixels, you will get the average of the two values, whatever the render target ratio dimensions are.
     
  3. Humus

    Humus Crazy coder
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,217
    Likes Received:
    77
    Location:
    Stockholm, Sweden
    For blur filters I would use a linear filter since that'll add more blur for free.
     
  4. Simon F

    Simon F Tea maker
    Moderator Veteran

    Joined:
    Feb 8, 2002
    Messages:
    4,560
    Likes Received:
    157
    Location:
    In the Island of Sodor, where the steam trains lie
    Perhaps "weighted sum of texels" would be a better way of expressing it?
     
  5. Scali

    Regular

    Joined:
    Nov 19, 2003
    Messages:
    2,127
    Likes Received:
    0
    Yea, and if you align the pixel centers and texel centers properly, you will only get weights of 1 and 0, hence one pixel is used completely, and its neighbours aren't used at all.
    So you effectively get a pointsample.

    What I got from the opening post is that he was asking whether the linear filter was turned off altogether when the texture and rendertarget are the same size (1:1 ratio). This is not the case. The linear filtering is still performed, it just yields the same result as pointsampling when your pixels and texels are aligned exactly.
     
  6. ProsperLOADED

    Newcomer

    Joined:
    Jan 16, 2008
    Messages:
    13
    Likes Received:
    0
    Indeed... :oops:
     
  7. Rodéric

    Rodéric a.k.a. Ingenu
    Moderator Veteran

    Joined:
    Feb 6, 2002
    Messages:
    3,997
    Likes Received:
    854
    Location:
    Planet Earth.
    I would have thought "Weighted average" was the best way to express it.
    (Not native english though.)
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...