X Tutup
Skip to content

Fix texture artifacts around Sprite3D with linear filtering#86875

Closed
Mickeon wants to merge 1 commit intogodotengine:masterfrom
Mickeon:Sprite3D-texture-no-repeat
Closed

Fix texture artifacts around Sprite3D with linear filtering#86875
Mickeon wants to merge 1 commit intogodotengine:masterfrom
Mickeon:Sprite3D-texture-no-repeat

Conversation

@Mickeon
Copy link
Member

@Mickeon Mickeon commented Jan 6, 2024

Closes #73739
Closes godotengine/godot-proposals#13044

This PR fully fixes the original issue described, by disabling the texture repeat on the material generated by Sprite3D, preventing the color to leak around the edges outright.

Before After
image image

This issue also exists in Label3D, but you'd never ever see it in practice, as it resizes with a bit of padding around the edges to compensate.

Bugsquad edit: Fixes #82044

@clayjohn
Copy link
Member

clayjohn commented Jan 8, 2024

@Mickeon
Copy link
Member Author

Mickeon commented Jan 8, 2024

Interesting. This PR started with that very same new bool property, but then I realised how useless it would be in practice and scaled it back to always be false.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more context in #82044

In particular it sounds like users sometimes use the region property of the sprite to make it tile within the Sprite3D. So we probably need to have an option to enable repeat like what was added in #82193

@clayjohn
Copy link
Member

clayjohn commented Jan 8, 2024

Interesting. This PR started with that very same new bool property, but then I realised how useless it would be in practice and scaled it back to always be false.

I guess we should verify that it can actually be used. This comment says that users can tile sprites by setting the region property

@Mickeon
Copy link
Member Author

Mickeon commented Jan 8, 2024

No, I do believe it. In hindsight it makes sense and can actually be used that way. My assumption was wrong.

Regardless of the way it is done, I'm not sure about it being the "default" as suggested. The repeating texture repeating issues around the border is not obvious.

@clayjohn
Copy link
Member

clayjohn commented Jan 9, 2024

No, I do believe it. In hindsight it makes sense and can actually be used that way. My assumption was wrong.

Regardless of the way it is done, I'm not sure about it being the "default" as suggested. The repeating texture repeating issues around the border is not obvious.

I agree. I think repeat could be an option, but shouldn't be the default

@398utubzyt
Copy link
Contributor

@clayjohn Is this PR intended to replace #82193? It seems like #82193 already provides an option to enable/disable sprite texture wrapping as discussed previously.

@imaskillissue
Copy link

No, I do believe it. In hindsight it makes sense and can actually be used that way. My assumption was wrong.

Regardless of the way it is done, I'm not sure about it being the "default" as suggested. The repeating texture repeating issues around the border is not obvious.

I agree. I think repeat could be an option, but shouldn't be the default

In my Pull Request(#82193) it's already by default disabled. I thought its most of the cases a bug then a feature and people who wanna use it most likely find how to enable it.

@clayjohn clayjohn modified the milestones: 4.3, 4.4 Jul 24, 2024
@anniryynanen
Copy link
Contributor

Is there something others (me, maybe) can do to help this PR move forward?

@akien-mga
Copy link
Member

Is there something others (me, maybe) can do to help this PR move forward?

It needs a decision from the rendering team on whether this approach is preferred, or exposing the repeat option like done in #82193 or #90202. So one thing you can do is check all three PRs and bring them up for decision making in a rendering team meeting.

@clayjohn
Copy link
Member

Is there something others (me, maybe) can do to help this PR move forward?

It needs a decision from the rendering team on whether this approach is preferred, or exposing the repeat option like done in #82193 or #90202. So one thing you can do is check all three PRs and bring them up for decision making in a rendering team meeting.

The rendering team discussed this in March and explained how it should be implemented here: #82193 (comment)

@tehKaiN
Copy link
Contributor

tehKaiN commented Oct 4, 2024

Um, so I happen to need this too in my game. Is anyone still working on it, or is it up for grabs?

Copy link

@StrayEddy StrayEddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FLAG_USE_TEXTURE_REPEAT is put to false, which would fix the issue

@Mickeon
Copy link
Member Author

Mickeon commented Dec 7, 2024

Please read the above comment and associated link

@Repiteo Repiteo modified the milestones: 4.4, 4.5 Feb 24, 2025
@Repiteo Repiteo modified the milestones: 4.5, 4.6 Sep 8, 2025
@Repiteo Repiteo modified the milestones: 4.6, 4.x Nov 19, 2025
@Calinou
Copy link
Member

Calinou commented Dec 5, 2025

Is this superseded by #98122?

@clayjohn
Copy link
Member

Superseded by #98122

@clayjohn clayjohn closed this Dec 11, 2025
@clayjohn clayjohn removed this from the 4.x milestone Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose texture_repeat on SpriteBase3D Sprite3D texture wrapping causing pixel lines on border Gradients on a sprite 3d have artifacts.

10 participants

X Tutup