Texture rendering is good without any texture error when the world size is small, but when it increased to some extend then it shows texture error. tried several texture mapping techniques but none helped(or may be I am doing it wrong) The issue is similar with shadow acne but it not shadow acne(That i am sure), as I haven't implemented any shadow mapping yet.
Don't know how to solve this one, any help would be appreciated(or what i am doing wrong).
(Attaching the shader code for reference)
out vec4 FragColor;
in vec2 ChunkTexCoords;
uniform sampler2D sampler;
void main() {
FragColor = texture(sampler, ChunkTexCoords);
if(FragColor.a == 0) discard;
}
Texture parameters
glTexParameteri(
GL_TEXTURE_2D,
GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE
);
glTexParameteri(
GL_TEXTURE_2D,
GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE
);
glTexParameteri(
GL_TEXTURE_2D,
GL_TEXTURE_MIN_FILTER,
GL_NEAREST
);
glTexParameteri(
GL_TEXTURE_2D,
GL_TEXTURE_MAG_FILTER,
GL_NEAREST
);
