Hi,
As imported textures in godot 4 no longer provide the ability for these to be flagged as repeating does any one know how a uniform sampler2d texture can be flagged for the shader as repeating?
Thank you.
Hi,
As imported textures in godot 4 no longer provide the ability for these to be flagged as repeating does any one know how a uniform sampler2d texture can be flagged for the shader as repeating?
Thank you.
Don't know how things are in Godot 4 but isn't tiling a default behavior for textures?
If nothing else works you can always wrap UV coordinates in the shader, or manipulate them in any way needed.
Thanks xyz.
When importing textures in godot 4 you can no longer choose for the texture to be set as repeat. You can however set it when assigning the image to a sprite2d for example - there is a property to indicate the texture is repeating. I was wondering if there is something similar to indicate to the shader a uniform sampler2d is repeating.
But anyhow I will do the wrapping within the shader.
It's this line that does it:
uniform sampler2D texture_albedo : hint_albedo,filter_linear_mipmap,repeat_enable;
Thank you very much cybereality.
I was thinking it would be something like this.
Cheers!
Yeah, no problem. I didn't know this either. But I noticed the standard material did repeat by default. So I converted the standard material to a shader material and just looked at the code.
© 2022 - 2024 — McMap. All rights reserved.