Source text I'm using a 2d shader over a Polygon2d. When I tried to use the UV or the TEXTURE_PIXEL_SIZE, they are always zero.

I suppose this can be explained because I don't set a texture directly in my Node. :/

But, is there a way I can bypass this problem ? Can I set the UV by myself using the shader parameter ?

thanks.

I suppose this can be explained because I don't set a texture directly in my Node

Try setting a dummy texture and see if it works? It doesn't have to be particularly large or anything. It can be a plain color texture.

I think most usually use the included godot default icon as a dummy placeholder in such cases.

ok, i will try this during the weekend. thanks, But it seems like a work arround for now.

7 days later

Ok, I learned that I need to setup the UV list inside the Polygon2D to have UV values in the shader, make sense.

But for this to work, I must set a texture in the polygon, even if I don't need it. Without texture, the shader don't receive UV values.

Is this can be considered a bug ?

I'm not sure, but it couldn't hurt to report. Worse case, the bug report gets closed, in which case I would recommend opening a proposal instead.

2 years later