Original Post
Hi - I don't think this is possible but I'm curious if there is a way to mix interpolation methods for a single texture lookup (wihtout custom shader). I am storing some colors in the RGB fields that needs GL_LINEAR interpolation and am storing another flag in the alpha channel that needs GL_NEAREST interpolation. I tried writing my own GLSL shader that does a GL_LINEAR texture lookup and then tries to round the alpha value. Doesn't seem to quite work though: // fVal: [0..1] float round( float fMaxRange, float fVal ) { // unnormalize value float fLabel = fMaxRange * fVal; // get decimal part of value float fFloorLabel = floor( fLabel ); float fDiff = fLabel - fFloorLabel; // round up if( fDiff > 0.5 ) fFloorLabel = fFloorLabel + 1.0; // renormalize return fFloorLabel / fMaxRange; } void main() { // lookup luminance (RGB) and label (A) vec4 vRGBA = texture3D( texture_src, vec3( gl_TexCoord[0] ) ); // do GL_NEAREST interpolation? vRGBA.a = round( 255.0, vRGBA.a ); .... } I did get my stuff to work with 2 textures but of course it's slower since it is forced to do 2 texture3D() calls. Thanks for any insight.