Home > Back-end >  Unity URP to WebGL is ignoring Sampler State
Unity URP to WebGL is ignoring Sampler State

Time:05-10

The Sampler State is being ignored once exported to WebGL. I have a plane that has one of its faces setup as to over extend the UV's 0-1 space, so the effect would make the texture applyied to it look smaller... it looks ok in the editor, but once exported as webgl, the clamping stops working and the texture gets repeated... is this a limitation of WebGL or a bug?

How it looks in the Editor

How it looks once exported as WebGL

UV layout of UV4

Shader Graph Node Setup

CodePudding user response:

SOLUTION: well i had the image used as decal with wrap mode set to repeat. I set it to clamp and it worked. Idk why the Sampler Node doesn't override this setting... i was especting the image to use whatever wrap method the sampler node was set to use. And weird enough... if the image uses repeat but the sampler node sets clamp, it wont work, final sampling will use repeat. But if you set the image to clamp and the sampler node is set to repeat, the image will be repeated... weird...

  • Related