#URP Shader Graph Clamp Border Color in Sampler State

1 messages · Page 1 of 1 (latest)

paper raptor
#

Is it possible to set the border color when using clamped sampling in shader graph? I'd love to set the alpha to 0 so I don't get any border artifacts on edges.

opaque bridge
#

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)

paper raptor
opaque bridge
#

Yeah had a feeling it was renamed but couldn't remember what

paper raptor
#

Hm, although... My border is transparent. But it doesn't take that transparency. Maybe it just takes the color (rgb) but not the alpha?

#

Oh wait it actually seems to work with Clamp and Replicate Border. 🙂