Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to fix texture aliasing on this toon shader

Discussion in 'Shader Graph' started by Fakkau, Mar 4, 2021.

  1. Fakkau

    Fakkau

    Joined:
    Mar 11, 2013
    Posts:
    22
    [EDIT]: Well, of course I managed to solve it the moment I posted this thread... My shader graph was using a Sample Texture 2D LOD node instead of a regular Sample Texture 2D node. The LOD node has a fixed LOD value, which meant the shader wasn't using the correct LOD when zooming out.

    -------------------------------------------------------------

    [ORIGINAL POST]:

    I'm using the toon shader as seen in this video, which can be downloaded from the link in the description:


    There's some texture aliasing going on when zooming out (the texture looks fine up close though). This aliasing doesn't happen when I use Unity URP's default shaders, so I'm pretty sure the problem is with the shader, not the texture.

    How would I go about fixing this in Shader Graph? I've had someone suggest that it might have something to do with the difference between point and linear sampling, but I don't understand enough about shaders to know what that means.

    Any help would be much appreciated!
     
    Last edited: Mar 4, 2021