Two textures with same size seem to have different scaling when blending them in tilemap shader

Godot Version

4.2

Question

I have a tilemap that shows sand and I want to create a wet effect using a shader. My idea is to mix from the normal tilemap to the wet one using the mix function (so that I can use tweens to create a transition from dry to wet).
The problem is that the wet texture, although it has exactly the same dimensions, still seems to have a different scale. This creates an unwanted zoom effect when fading back and forth.
I attached the shader to the tilemap and not to each tile itself (although this seems to have the same effect).

Hey there, try disabling the „Repeat“ option in the TextureParameter Node as well as setting the „Type“ from “Data” to “Color”.

Hey, thanks for your answer! I tried the things you suggested however it didn’t change anything.

tested but i dont get the scaled unwanted zoom by changing the float value

float 1
image

float 0.5
image

BUT when i try to add the texture from here:
image
with a bit cropped image of itself, the image changed

image

so i assume you will need to have both image of the tile and the input texture to be exact same resolution to make it work

testing it on real tilesets (GIF):
tileScale

disabled the Use Texture Padding
seems to have resolved the random scaling, but there’s still a bit difference in zoomed

Edit: changing the tilemap Texture Filter to Nearest now fixed the “a bit difference”

but really disabling the Use Texture Padding should fix your issue

Thank you very much :smiley:
Disabling Texture Padding did the trick.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.