-
-
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
Default Viewport texture repeat mode changed in 4.0 #73373
Comments
…revent texture repeat bleeding into the edges. This is to address a change in the default repeat mode in Godot 4 RC2: godotengine/godot#73373
Repeat mode is now set on the shader instead of on the texture itself. When using ShaderMaterials, you can set the repeat hint as you have done. When using StandardMaterial3D, you can adjust the texture_repeat property and set it to |
Thanks @clayjohn! I did not know about this property. I have updated my original post to reference this. |
This is done by design indeed. I don't think we should make a special case for ViewportTextures compared to regular textures. |
Actually, now that I know that StandardMaterial3D does have a property to change this, I understand that the important thing here is that StandardMaterial3D defaults to "repeat". In Godot 3, the So, in this way, there is no change in the defaults. Only a change in where this texture property is set. I am closing this issue because I understand why things appear different at first glance. |
Godot version
v4.0.rc2.official [d2699dc]
System information
Windows 10, NVIDIA, Forward+, Mobile, and Compatibilty
Issue description
I am posting this because I am not sure if it is an intentional change in Godot 4.0 or if it is a possible "regression".
In Godot 3, the texture repeat of a Viewport texture is set to "not repeat" (clamp). In Godot 4, the texture repeat of a SubViewport texture is set to "repeat".
This issue is simply resolved by changing the texture repeat mode in a shader:
Or, if you are using a StandardMaterial3D material, you can change the repeat mode to "Off" under "Sampling" (this changes the texture_repeat property).
The new default repeat texture mode of Godot 4 becomes problematic if your UVs of a mesh are set to the full 0 to 1 range. In this case, the repeated edge can be seen bleeding through. With the texture repeat mode set to "no repeat", this specific use case has no problems, so this change may be seen as a regression in Godot 4 for this use case.
It seems there was no way to change the repeat mode in Godot 3.5, so now that there are ways to easily change this, it might not be a problem that the default has changed from "no repeat" to "repeat".
Steps to reproduce
Minimal reproduction project
ViewportTextureRepeat.zip
The text was updated successfully, but these errors were encountered: