Search Unity

Question How to set camera.activeTexture to bilinear filter like Pixel Perfect Camera's "Stretch Fill" does

Discussion in '2D' started by eighto, Oct 16, 2020.

  1. eighto

    eighto

    Joined:
    Apr 27, 2013
    Posts:
    32
    Setting my sprite textures to bilinear makes them way too blurry, but the stretch fill option sets the camera's activeTexture to bilinear which adds a slight barely noticeable blur (anti-aliasing). I like this and I want my cameras to always have it so that I can have smooth zooming without noticeable pixel morphing and so that my split-screen cameras can be the same size for each screen resolution, with uniform pixels (or the appearance of uniform pixels).

    I've been trying to figure this out for awhile, tried editing the PPC script, etc. Basically what I want is a script I can attach to each of my cameras that sets their textures to be anti-aliased like that.

    Thanks for your time, would appreciate any responses.
     
    Last edited: Oct 19, 2020
  2. eighto

    eighto

    Joined:
    Apr 27, 2013
    Posts:
    32
  3. eighto

    eighto

    Joined:
    Apr 27, 2013
    Posts:
    32