   How to define an area without texture [GLSL]
  Hi,For a soccer project i'm putting my textures on my soccer field with glsl shaders, but i'd like to remove the texture on a defined area.How can i do that with glsl ?   
  You could pass in an attribute to the vertexes to say whether texturing is enabled or not at the vertex.If you define a varying output, you can then send that information on to the fragment shader. Within the fragment shader, you could use that to determine whether to do the texture lookup or use the constant colour.If you used a floating point number to indicate this, it would allow you to smoothly blend texturing on and off across polys.If you're not using it for anything else, you could do the same thing with the alpha value of the input color -- that way you don't need to set up any additional attributes.OOI, what problem does turning the texturing off solve that simply having an area of flat colour within the texture doesn't?;  I've started to learn glsl not a long time ago so i don't realy know how to say if my texture is enabled or not.Let me explain with a screen shot :http://img72.imageshack.us/img72/2292/captureip.pngI have different layers of texture (one for the grass, one for the stripes, and one for the white lines) and I want to remove the stripes where the texture is bright (out side the lines).Here is my code :Fragment shader :uniform sampler2D maTexture;uniform sampler2D maTextureDetail;uniform sampler2D lignes;uniform sampler2D stripes;void main(void){   vec2 tc1 = vec2(gl_TexCoord[0].s, gl_TexCoord[0].t);   vec4 diff1 = texture2D(maTexture, gl_TexCoord[0].st * 30.0);   vec4 diff2 = texture2D(maTextureDetail, tc1.st * 30.0);   vec4 diff3 = texture2D(lignes, tc1.st);   vec4 diff4 = texture2D(stripes, tc1.st * 24.0);   gl_FragColor = diff1 * diff2 / diff4 + diff3;}Vertex shader :void main(){gl_TexCoord[0] = gl_MultiTexCoord0;gl_Position = ftransform();}   ;  I found a way to do it but i don't know how to program it.If i can get the color of a pixel of one a texture, I do if(textureX.color != grey){   setTexture}But what would it be in glsl...   