I’m currently trying to port someone’s GL code from using NV specific extensions to ARB ones. The code uses texture shading and register combiners which I believe are supported by ARB (via ARB_texture_env_combine). I’m somewhat new to fragment shading and don’t know all that’s going on in the code. Basically, I’m trying to retrieve green-blue values from a texture (dependent texturing) and I can’t seem to figure out how I might do this with the ABR extensions.
My snippet of code looks like:
glActiveTextureARB(GL_TEXTURE2_ARB);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DEPENDENT_GB_TEXTURE_2D_NV);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_2D, this->greenBlue_tex);
this->greenBlue_tex is 256x256 array that holds RGB values (with R=0). I’m basically trying to do color correction.
Anyone know how to do this using ATI_fragment_shader? I have the same problem (needing to go a green-blue dependent texture read).
Thanks,
Fuzzy.
Originally posted by werh37:
[b]I’m currently trying to port someone’s GL code from using NV specific extensions to ARB ones. The code uses texture shading and register combiners which I believe are supported by ARB (via ARB_texture_env_combine). I’m somewhat new to fragment shading and don’t know all that’s going on in the code. Basically, I’m trying to retrieve green-blue values from a texture (dependent texturing) and I can’t seem to figure out how I might do this with the ABR extensions.
My snippet of code looks like:
glActiveTextureARB(GL_TEXTURE2_ARB);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_DEPENDENT_GB_TEXTURE_2D_NV);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_2D, this->greenBlue_tex);
this->greenBlue_tex is 256x256 array that holds RGB values (with R=0). I’m basically trying to do color correction.