-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sprite3D texture wrapping causing pixel lines on border #82044
Comments
I've done some additional troubleshooting this afternoon for this. As a workaround, I tried to create a InstanceMesh3D planeMesh instead, with the texture set as a material. The issue occurs here too, however luckily we have the option to disable Repeating textures in Sampling on the material. When disabling Repeat in this way, the issue goes away. It's definitively linked to the Repeat property, but we can't change that for Sprite3D. |
I have also tested this and can confirm on Win 10 Nvidea 765M on 4.1.1 stable and 4.2 dev5 with the same result as OP. |
The repeat setting should likely be set to REPEAT_DISABLED for all Sprite3Ds. Sprite3D's get their material from Material.get_material_for_2d(): godot/scene/resources/material.cpp Line 2365 in fe5b1c8
To fix this issue, we can just add a new parameter to get_material_for_2d() to enable/disable repeat (i.e. Then call And in Sprite3D ensure that you always disable p_repeat when creating a material |
Note for those trying to reproduce this: this is more likely to be visible when MSAA is enabled. |
Could this be somehow related to #67164? Sprite2D has also problems displaying only the wanted pixels. |
Can this be the default but an option? Sprite2D and Sprite3D also have the Region property, it's not uncommon to increase the region rect to tile the texture. |
Sure, that makes sense |
Godot version
v4.1.1.stable.official [bd6af8e]
System information
Godot v4.1.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2080 Ti (NVIDIA; 31.0.15.3734) - Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 Threads)
Issue description
Sprite3D has pixel lines which appear to be the texture wrapping. There are no options on Sprite3D to disable wrapping.
Some troubleshooting for this issue has been carried out in my Reddit thread.
Tested on 4.1.1 and 4.2dev5
Steps to reproduce
Minimal reproduction project
Sprite3D_bug_21-09-23.zip
The text was updated successfully, but these errors were encountered: