Hy, I'm new to game developping and currently learning 😛. I'm using godot V4.0.3, and experimenting with shaders and pixel art. When I try to use a sampler2D variable to import an image into my shader code, it somehow corrupts that image?? I have no idea what I'm doing wrong. Here is the shader that I am using:
shader_type canvas_item;
uniform highp sampler2D form : filter_nearest;
void fragment() {
vec4 f = texture(form, UV);
COLOR = f;
}
now, when I put this 3x3 image in the sampler2D form var:
My image file gets corrupted and somehow becomes this image:
Which is strange since godot says it is a 3x3 image, but somehow shows a 4x4 pixel image? I don't get it, what am I doing wrong?