filtering in shaders

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ReudsFratt92

Is it possible to set filtering mode for a sampler2D used in shaders?

:bust_in_silhouette: Reply From: Haydoggo

In Godot 4, you can specify how sampler2D uniforms are filtered with filtering hints.

uniform sampler2D filter_on : filter_linear;
uniform sampler2D filter_off : filter_nearest;