#URP Shader Graph Clamp Border Color in Sampler State
1 messages · Page 1 of 1 (latest)
No, but clamp sample mode uses the colours at the edge of the texture. So could add a 1-pixel transparent padding/border to that texture.
(And if it has mipmaps there's a setting that can be enabled on the texture, "Border Mip Maps" or something, to keep those edge colours even at smaller mipmap levels)
Alternatively use the Rectangle node with the same UV input and width/height of 1 (and "Fastest" on dropdown to remove anti-aliasing). And use that to mask the texture (rectangle into T of Lerp, with A as border color, B as texture)
It seems to be called "Replicate Border". Thanks, that's good to know that it always just takes the border pixel and doesn't sample "into the texture". I'll just add 1px padding to all my textures.
Yeah had a feeling it was renamed but couldn't remember what