X Tutup
Skip to content

Fix Sprite3D texture bleed when not wrapping#98122

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
cadence-s:fix-sprite3d-bleed
Dec 2, 2025
Merged

Fix Sprite3D texture bleed when not wrapping#98122
akien-mga merged 1 commit intogodotengine:masterfrom
cadence-s:fix-sprite3d-bleed

Conversation

@cadence-s
Copy link
Contributor

@cadence-s cadence-s commented Oct 12, 2024

Fixes #82044.

Texture wrapping is now turned off by default in 2D-in-3D, except for the case where a Sprite3D has a defined region larger than the texture size. According to @clayjohn this was discussed as a good solution in a rendering meeting (#82193 (comment)).

@cadence-s cadence-s requested review from a team as code owners October 12, 2024 18:21
@AThousandShips AThousandShips added bug topic:rendering topic:3d cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Oct 13, 2024
@AThousandShips AThousandShips added this to the 4.4 milestone Oct 13, 2024
@Repiteo Repiteo added the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Feb 24, 2025
@Repiteo Repiteo modified the milestones: 4.4, 4.5 Feb 24, 2025
@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 19, 2025
@etherealxx
Copy link
Contributor

Will this be in 4.4.1?

@AThousandShips
Copy link
Member

This hasn't been merged yet and won't be cherry-picked until after it has been merged, so probaly won't be in 4.4.1 as we are planning to release that pretty soon

@akien-mga akien-mga requested a review from a team March 20, 2025 14:46
@Repiteo Repiteo added the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Sep 5, 2025
@Repiteo Repiteo modified the milestones: 4.5, 4.6 Sep 5, 2025
@Repiteo Repiteo modified the milestones: 4.6, 4.x Nov 18, 2025
@tehKaiN
Copy link
Contributor

tehKaiN commented Nov 20, 2025

Hi,

What's the status of this PR? The feature is important for my team. I see that it was pushed back to 4.5 and now to 4.6. Is it a manner of positive review, or is something else still needing work?

Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

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

What's the status of this PR? The feature is important for my team. I see that it was pushed back to 4.5 and now to 4.6. Is it a manner of positive review, or is something else still needing work?

AFAICT it's awaiting a review from @godotengine/rendering.
But currently it's also outdated / it has conflicts with the current master branch. So would need to be rebased as well.

Seems there's also #90202 which aims to resolve the same issue, but AFAICT this PR is more aligned with what the rendering team wanted the solution to be. Hence I'm leaving my review here.

@AThousandShips
Copy link
Member

You used a merge commit to update your branch, please use rebase in the future instead, see here

@cadence-s cadence-s force-pushed the fix-sprite3d-bleed branch 3 times, most recently from 282c9e9 to 19f8a74 Compare November 24, 2025 20:09
@cadence-s cadence-s requested a review from a team as a code owner November 24, 2025 20:09
# Conflicts:
#	scene/resources/material.cpp
@cadence-s
Copy link
Contributor Author

This should be all cleaned up now

Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

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

LGTM, fixes the issue.

As the rendering team wanted the repeat flag is being enabled/disabled automatically. However, according to my suggestion, it's done in a slightly different manner than originally suggested, as it's based on the final UV region used instead of solely based on the Sprite3D.region (this makes it work e.g. for AtlasTextures). Nevertheless, this should get an approval from the rendering team before merging.

@akien-mga akien-mga removed cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels Nov 26, 2025
@OeilDeLance
Copy link

I am looking to test this in our custom 4.5 build.
What do you think will that merge fine into 4.5.1 ?

@cadence-s
Copy link
Contributor Author

I am looking to test this in our custom 4.5 build. What do you think will that merge fine into 4.5.1 ?

There shouldn't be any problems with merging it into 4.5; the relevant code hasn't changed in a long time.

@akien-mga akien-mga modified the milestones: 4.x, 4.6 Dec 2, 2025
@akien-mga akien-mga merged commit 44bc2da into godotengine:master Dec 2, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@clayjohn clayjohn removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Jan 8, 2026
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.

Sprite3D texture wrapping causing pixel lines on border

9 participants

X Tutup