[solved]strange lines with glsl
Posted: Sun Nov 09, 2014 8:59 am
hello everyone. i'm trying to use texture in an odd way, single texture for both color and normal map,and i put them side by side , half color half normal. to be exact 1/9 tolerance 3/9 color 1/9 tolerance 3/9 normal map and another 1/9 tolerance. here is one of my texture.

why i did this? because obviously i need a lot of textures for single terrain, i tried to render 2D level created using tiled, and 8 textures used up. btw in glsl shader, i use these codes.
somehow i get weird blue lines

i have tried clamp the coord, it doesn't help. how can i fix this?
thanks in advance

why i did this? because obviously i need a lot of textures for single terrain, i tried to render 2D level created using tiled, and 8 textures used up. btw in glsl shader, i use these codes.
Code: Select all
float perNine = 0.1111111111111111111111111111111;// (1.0 / 9.0);
//coupt lands
col_coord = ncoord * 25;
col_coord.x = mod(col_coord.x, perNine * 3.0);
col_coord.x = clamp(col_coord.x, 0.0, perNine * 3.0);
col_coord.x += perNine;
vec4 sCorrupt = texture2D(corrupt, col_coord) * sSplat.r;
col_coord.x += perNine * 4;
vec4 sCorruptNormal = texture2D(corrupt, col_coord) * sSplat.r;

i have tried clamp the coord, it doesn't help. how can i fix this?
thanks in advance