TokisanGames/Terrain3D

Disabling the texture filtering?

Rain-Gayming opened this issue · 7 comments

Description

I want to be able to use solid colours for textures and the blurring/texture filtering is something i don't like. Could there be a way to disable it?

Change texture filtering to nearest in the material settings, or enable the shader override and adjust the sampler filtering however you like.

@TokisanGames Changing it from Liniar to Nearest doesnt seem to change anything

It does. Zoom in, increase the uv scale of your textures, or watch the tutorial videos where it's demonstrated.

This is it on each setting without a change
image
image

This shows what texture filtering does with textures that have detail:
https://youtu.be/YtiAI2F6Xkk?t=537

This shows what it changes:
https://github.com/TokisanGames/Terrain3D/blob/main/src/shaders/uniforms.glsl

You can look through the Godot docs for other filtering options and enable the override shader to experiment with them. We don't control the renderer. For filtering we just pass it along to the renderer.

However, what you have on your screen probably has nothing to do with texture filtering. Read this:
https://terrain3d.readthedocs.io/en/stable/docs/shader_design.html

Most likely you're looking at the blend between vertices. Edit the shader override and disable the weighted average of adjacent vertices, aka bilinear interpolation, and use the values of just one vertex.

is there a way to remove the blend?

I just told you in the last paragraph.