For example, if I have a Render Target whose FilterMode is set to FilterMode.Point:
var rt = buffer.GetTemporaryRT(
...
filter: FilterMode.Point,
...
);
But I sample it with a linear sampler state in fragment shader:
SAMPLER(sampler_linear_clamp)
...
return SAMPLE_TEXTURE2D(_MainTex, sampler_linear_clamp, uv);
Then what would I get? Point or bilinear sample?
It seems to get point filtered, but I'm not sure. I'd like to know the rule behind it. How do these two things (FilterMode in C# and sampler state in shader) interact.
The answer is here: https://docs.unity3d.com/Manual/SL-SamplerStates.html
Short answer is that, by convention, it should use the Texture's sampling options, especially if you follow the correct naming conventions, but you can override that in the shader if you want to do something crazy,