   changing texture gain and offset on the fly
  Hi, Is there any way to change the texture gain and offset after the texture is generated, as opposed to regenerating the texture?I am currently generating the texture as follows:    glPixelTransferf(GL_RED_SCALE,   65536.0f/max);    glPixelTransferf(GL_GREEN_SCALE, 65536.0f/max);    glPixelTransferf(GL_BLUE_SCALE,  65536.0f/max);    glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE16, pImage->Width(), pImage->Length(), 0, GL_LUMINANCE, GL_UNSIGNED_SHORT, pImage->GetPtr(0));but I would like to dynamically change the gain while drawing instead. Thanks,WF   
  You could use material properties to modulate the color.MaterialColor * TextureColor.This wont provide you any offsets though. Unless you mean textue coordinate offsets, then you could use a texture matrix.I would suggest you use shaders for this. Then it'd be very easy to setup outColor = colorOffset + texColor * colorScale;   ;Quote:Original post by bzroomYou could use material properties to modulate the color.MaterialColor * TextureColor.This wont provide you any offsets though. Unless you mean textue coordinate offsets, then you could use a texture matrix.I would suggest you use shaders for this. Then it'd be very easy to setup outColor = colorOffset + texColor * colorScale;Thanks bzroom. I'm afraid I'll have to learn to make a simple shader, trying as I have been to avoid it. Once I learn, I'm sure the benefits will outweigh any added  complexity. Do you have any links to an ultra simple shader tutorial that would get me going? Thanks,WF   ;  Sure:http://www.lighthouse3d.com/opengl/glsl/