Sampler settings don't seem to have any effects

#1

When adding a new sampler in the material file, settings like ‘Filter Min’ and ‘Filter Max’ don’t have any effect on the material.

I created a tilemap and duplicated the default tile map material(‘tile_map.material’). I then added a new sampler ‘texture_sampler’(because that’s the name of the sampler2D uniform in the default fragment shader) to the new material and then set the ‘Filter Min and Filter Max’ to ‘Nearest’. When i applied the material to the tilemap i created i didn’t notice a difference.

However, when i changed the gobal ‘Filter Min’ and ‘Filter Max’ from the game.project file i got the expected result(but only if there were no samplers in my material file).


0 Likes

#2

Can you upload your project or a small sample project where you see this happen?

2 Likes

#3

FarLand.zip (158.5 KB)

0 Likes

#4

Did you check in the runtime (add tilemap on the collection and run it)?
I tried your example and it works fine in game, but in the editor it’s always linear for me.
Could you please check it?

0 Likes

#5

It is working when building the project! I was so focused on getting it to work in the editor that i forgot to check if it was working on the build. I guess it is an editor bug then?

3 Likes

#6

Yes, it seems like it!

0 Likes