I am working on a voxel engine and I'm trying to texture my terrain but I get very strange artifacts.
I lookup the texture coords depending on the worldposition, the relevant line of my shader code is
vec3 vtex = mod(my_vWorldPosition.xzy,64.0)/64.0;
It seems whenever worldpos.xyz/64.0 is 0 the artifacts appear, if I offset the position by 0.0001 they are gone.
I think its because of a precisson loss or something, how can I overcome this?
Here is a pic how it looks like: