Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

What's the difference between LoadTexture and SampleTexture?

Discussion in 'Visual Effect Graph' started by andybak, Mar 12, 2020.

  1. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    559
    And why is there zero documentation for blocks and nodes! Some of them are obvious but quite a few aren't.

    (Also - docs should cover the "why" and "how" instead of just the "what" but that's a debate for another day...)
     
  2. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    284
    Node library documentation will come in the future.

    To answer you question:
    • SampleTexture takes uv (so in normalized coordinates) as input and use the texture sampler for interpolation (nearest, bilinear, trilinear...)
    • LoadTexture takes texel coordinates as input and doesn't perform interpolation (you get the exact value of the sampled texel)