0 votes

Whenever I enable the border region of a sprite and set a custom width and height Godot draws the frame of the border continuously, which looks horrible. Is there a way to disable that?

enter image description here

in Engine by (249 points)

What do you expect it to do though? Draw empty pixels? You specified a region which is larger than the texture. What is the goal?
It does this because the texture's border pixels on the right are not transparent pixels, they are blue pixels. And because the texture's import settings don't repeat by default, the right border just keeps being redrawn causing this sort of trail.
But without knowing what you really want, it's hard to tell what you need to do.

oh sorry, I just want empty pixels around it so I have space for shaders on the sprite

Yeah this is not how it works. You will really have to either add one line of pixels around so that it produces that effect, or you will have to deal with this in your shader somehow if UV is greater than 1 or lower than 0. The texture will either be clamped (like your screenshot) or repeated based on its import settings, but "new pixels" of a different value can't be generated like this without changing the texture.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.