0 Replies Latest reply on Mar 22, 2012 4:55 PM by kupal

    M9 (rv250) color indexed textures via fragment shader

    kupal

      Hi, this is a long shot as I am working on a driver for an obsolete GPU but I am hoping there might be help out there.

       

      I am currently trying to implement hw accelerated paletted textures (EXT_paletted_texture) in our driver via the ATI_fragment_shader extension.  We have been able to implement fragment shader code (two passes, which is all the rv250 has) to perform the color index lookup in the palette and render the texture.  The problem is implementing the shader code to be able to account for application texture environment parameters (i.e. glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE).

       

      When the fragment shader extension is disabled, our driver has a "fixed shader code" lookup table that contains code for various texture environment parameters.  Is it actually possible to sample the index, followed by a dependent read from the palette all in one pass and in the second pass, apply texture environment settings?

       

      Any input on this would be appreciated.

       

      Thanks