All Questions



Shader secrets: Outline shader - source image padding

This was the first time I was stuck for some time - problem with texture bleeding when using region with my own sprite. Next I realized that this can be solved using padding of at least 1 pixel in the source image (or is there some other way?). Maybe it would be helpful to mention somewhere in the beginning of "Refining and troubleshooting" section.

  • Nathan Lovato replied

    I'm unsure what you mean. Would you have a screenshot you could upload somewhere to see the issue in question?

    If I get it correctly, you mean that using a texture region in, say, an atlas image with other sprites around the selected one, you had pixels from other parts of the texture appearing around your sprite's borders? If so, we don't cover that in the outline shader mainly because it's an issue that's shader-agnostic; it can happen with any sprite and has to do with the region. It's not related to the lesson in this case, I'd say.

    If you get stuck with issues like these, you can ask us a question anytime, we're here to help!

  • A
    arampl replied

    "Texture bleeding" was false terminology, sorry.

    I followed this lesson using Godot's "icon.png" and when reached section "Refining and troubleshooting" and enabled region got that thing like "GL_CLAMP_TO_EDGE" from

    You right, this is not related to shader itself.

    Thank you for answer and I am apologize for taking your time.

  • Nathan Lovato replied

    No worries, and don't apologize, we're here to help!