-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
NoiseTexture2D seamless not working #71996
Comments
Do you have repeat enabled on your CanvasItem? |
I did not not, though enabling it did not change anything |
It looks like the repeat property is not getting correctly set in the VisualShader then. This isn't an issue with the NoiseTexture itself as the repeat mode is set within the shader. |
Also doesn't work using This behaviour isn't only in visual shaders. In glsl shader the difference is following:
In 3.x this doesn't cause problems since repeat is set by texture basis on importing. In 4.x is there any way to change filter & repeat without changing shader code itself? |
I think this is intended behavior. The filter/repeat in CanvasItems apply only to the node's own texture (e.g. |
Exactly, this was my understanding as well. However, I think it is an oversight since there's no way to change filtering/repeat flags from the editor without touching shader code. In a sense, it is a regression since in 3.x you could do it by changing texture import settings. |
This comment was marked as outdated.
This comment was marked as outdated.
I found repeat hint. That's better than #71996 (comment) |
This issue is about visual shader and not about common shaders, and that flag is already been used by that check box. |
To reiterate, there is some bug going on, afaik. Did anyone find a fix, even if it's just a workaround? |
@DasGandlaf If you connect the sampler port to the |
@Chaosus Yes, but changing it to sampler port, uses the texture from the scene. The one that was defined in the node. I hope this demonstrates the problem correctly: Using SamplerPort as the source, it uses the texture from the scene. But I want to set repeat on the noise, which I have imported from the FileSystem. Anyways, I do appreciate your help. |
@DasGandlaf Then simply replace that texture to the NoiseTexture in the inspector. |
I don't think that is a fix. It wouldn't work, If I need two different scrolling, repeating noise textures for example, as I can only set one to the node in the inspector. It should allow to set |
@DasGandlaf You've not connected it to the output color, that's why the default texture is shown. After adding a Texture2DParameter node you should be able to assign a texture to it through the inspector ( |
@kleonc I'm afraid you don't understand the problem. But if you say to change the texture of the sprite2d node to a noise, and in the shader to set the color output to the desired texture, in this case the godot icon, the question arises, as to how one can make 2 scrolling noise textures, which one wants to combine, to get a desired effect. |
Something like this? |
Oh.. so SamplerPort is a shader parameter, that takes a texture. I thought it uses the texture from the sprite2d node. I did not understand that until now. Maybe I didn't know it because of my limited knowledge of shaders, but I think maybe it should be more intuitive? To somehow mark nodes that take shader parameters. I think some people may get confused about that. |
Sampler port is the literal equivalent of sampler2D in shader code, how could it be more intuitive?? |
Nobody needs your stupid question. The reason why I and many other people are using visual shader is, guess what, because we don't know how to code shaders. Now if you think about it, that would mean, we don't know know what Samplerport means in shader code either (mind blown). How could it be more intuitive? Well. Just add a little text at the top, (shader parameter). Do you see, how it can possibly be more intuitive? Either don't try to make me look stupid, or reformulate your sentence. |
All ports are shader parameters. So that little text is NOT helpful at all. Things like this are exactly why I asked, because things that you think are helpful aren't necessarily helpful AND/OR as a coder I don't know what visual shader users expect. Also: we have a code of conduct in this repo and calling others stupid does not jive with it. |
Hello, I had same issue, Texture2DParameter seems to fix the problem. But I think it would help a lot if we had possibility to set a default value in If we could see the result directly in the visual shader editor it would be cool. |
I ran in this exact same issue and first found this thread: #74310 I think that is the same issue? Is that how it eventually will work? Or would we always have to create parameters to make 2D textures repeat 🤔 ? |
Learning more about visual shaders in Godot and there's a gap there in documentation I guess, though it is being discussed in blog post like this one https://godotengine.org/article/major-update-visual-shaders-godot-3-2-part-2/#sampler-type That's 3.2 so it doesn't have the 4.x repeat option, but the 4.1 docs don't even mention sampler type (in meaningful ways) https://docs.godotengine.org/en/stable/search.html?q=sampler+type&check_keywords=yes&area=default |
Has anyone had any updates on this issue? I've tried everything and can't get a noise texture to pan along with time, seems like a pretty basic thing to do, am I missing something? |
Godot version
Godot 4.0 Beta 15
System information
Windows 10
Issue description
Scrolling a seamless 2D noise texture in 2D does not work as the texture does not appear to be seamless.
The visual shader is the same between Godot 3.5.1.stable and Godot 4.0 Beta 15.
The NoiseTexture is supposed to be moved by 0.5 in all examples.
Broken in 2D
Works in 3D on a planar mesh
Works in Godot 3.5.1.stable
Steps to reproduce
Open Scrolling2DNoiseTexture.tscn in the appended example
Minimal reproduction project
Broken2dSeamlessNoiseTextures.zip
The text was updated successfully, but these errors were encountered: