Godot Version
4.3
Question
I am creating a tilemap system that can render large seamless textures to subsets of tiles. To do this, I’m using a chroma key shader applied to a tilemap object, that replaces all the pixels of a certain color with a texture2d passed into the shader via a sampler2d object. It works great, and renders the image overlaying the tiles perfectly, except for one problem. The filtering option for texture2d is set to “linear” by default, and i want it to be “nearest”, i.e. no filter. I have set the default canvas texture option to “nearest” in project settings, and this seems to work for just popping in the image as a sprite, but the shader still seems to be using the linear filtered one no matter what I do.
In Unity you can just set the filtering options per-texture, and I’m not sure how to do that in godot or why that wouldn’t be an option. Any ideas? Thanks!