Ian Romanick wrote:
Ryan Underwood wrote:
GL_ATI_envmap_bumpmap seems to describe identical functionality to DirectX6 EMBM. ATI's drivers support this extension and it is implemented in Mesa apparently. Does anyone know of a demo or sample code that utilizes this extension?
ATI's drivers do support it, but Mesa does not. This would be a useful extension to have in Mesa since R100, R200, G400, and i830 all support it in hardware. I looked at adding support for it once. The main barrier is that the DUDV texture formats (which are the same as the DSDT texture formats in NV_texture_shader) are *signed*. Mesa doesn't currently have any support for signed texture formats.
Let me elaborate on that a bit. Texture data with a format of GL_DUDV_ATI should have a type of GL_BYTE. All of the signed types, like GL_BYTE, have a range of [-1,1]. In all existing cases, texture data has a range of [0,1]. When Mesa gets a texture of GL_BYTE, it modifies each value by (x+128)*2 to convert it to a GL_UNSIGNED_BYTE.
Each texture has a function to fetch raw, unsigned color data from the texture. We'd either have to add a new function to fetch raw, signed DSDT data or do some sort of trickery. The GL_ATI_envmap_bumpmap says that fetch color data from a DSDT texture give {0,0,0,1}. Since I didn't see an obvious, architecturally clean way to do it, and I already had (have!) a lot of other stuff on my plate, I left off there.
One of these days I'm going to add support for signed/floating point texture formats. They'd be pretty handy in conjuction with fragment programs.
I'll probably wind up adding new texel Fetch functions that return 4 GLfloats.
Fetching DSDT texels as floats would probably be good since you need to apply a floating point rotation matrix to the fetched texel.
How does that sound, Ian?
-Brian
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel