Texturing follows:
gl_FragColor=texture2D(my_main_texture, vUv);
gl_FragColor= mix(gl_FragColor,texture2D(texture[1], 32.0*vUv),texture2D(mask[0], vUv).r);
gl_FragColor= mix(gl_FragColor,texture2D(texture[2], 32.0*vUv),texture2D(mask[0], vUv).b);
For example, using a mask:
But for some reason on the border between the red and blue masks do not produce a texture value, although the number of channels for each pixel between the blue and red mask is 255
For example, the following code having:
gl_FragColor=vec4(0.0);
gl_FragColor= mix(gl_FragColor,vec4(1.0),texture2D(mask[0], vUv).r);
gl_FragColor= mix(gl_FragColor,vec4(1.0),texture2D(mask[0], vUv).b);
I get:
The shaded circle - this is the border between the red and blue mask, it should not be
How to get rid of it? Perhaps the reason to use mix (), and there are other ways to achieve the desired result?