Search Unity

Texture sampler address modes - border colour

Discussion in 'General Graphics' started by elboni, Feb 17, 2018.

  1. elboni

    elboni

    Joined:
    Sep 19, 2016
    Posts:
    6
    How do I set the 'Border' address mode equivalent to dx11 border mode?

    https://msdn.microsoft.com/en-us/library/windows/desktop/ff476256(v=vs.85).aspx

    As opposed to wrap, mirror or clamp, this would allow me to set a colour to be used outside of the uv boundaries. I'm using the projector shader to project one camera's view on a mesh, and want the colour of any part of the mesh that isn't projected on, to be black
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    I suspect it is not supported, just like it's not possible to make a sampler state with anisotropic filtering enabled.
     
  3. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520