TextureArray2D Texture filtering

Godot Version

4.5

Question

I’m currently creating a simple voxel render with some 16x16 textures. The problem is that my textures keep blurring, normally I’d just turn on nearest filtering but that isn’t a option for texture arrays. The current workflow is:
ShaderMaterial –> Shader –> Selects texture in texturearray from red color value
C# –> Generates mesh and adds color to face depending on texture. –> Applys ShaderMaterial

Is there any way to turn on nearest filtering with texturearrays?

You should be able to set the filter when declaring the sampler2DArray uniform like:

uniform sampler2DArray texture: filter_nearest;

More info: