Dave Airlie wrote:
When I run nwn with the i830 advertising GL_EXT_texture_compression_s3tc,
either by making the lib available or forcing the option in drirc, I get a
wierd lighting interaction..

http://www.skynet.ie/~airlied/dri/screen/NWN0000a.jpg

vs with s3tc off.
http://www.skynet.ie/~airlied/dri/screen/NWN0000b.jpg

I think it has something to do with mipmapping or lighting as if I zoom in
on the character the zoomed in textures come good..
http://www.skynet.ie/~airlied/dri/screen/NWN0000c.jpg
vs
http://www.skynet.ie/~airlied/dri/screen/NWN0001a.jpg

Anyone seen anything like this on other cards? I'll try and get a radeon
for testing soon, my last one stopped working :-(..
I've seen similar things (didn't look exactly like that, but mipmaps were broken too) when I first experimented with the radeon/r200 patch. This IMHO looks like mipmap offsets are completely wrong for some reason. I don't know if there are some tricks with mipmap offsets for the i830 (e.g. the radeon/r200 have some 32 Byte alignment restrictions for all textures), though I just noticed a small error in the patch:

 +   case MESA_FORMAT_RGB_DXT1:
+     t->texelBytes = 2;
+     textureFormat = (MAPSURF_COMPRESSED | MT_COMPRESS_DXT1);
+     break;
+   case MESA_FORMAT_RGBA_DXT1:
+   case MESA_FORMAT_RGBA_DXT3:
+     t->texelBytes = 4;
+     textureFormat = (MAPSURF_COMPRESSED | MT_COMPRESS_DXT2_3);
+     break;

RGBA_DXT1 (if it works correctly or not is a different matter) almost certainly needs to be set to the same values as RGB_DXT1 to get at least somewhat correct results.
Also, if texelBytes is used to calculate memory addresses (like mipmap offsets), then the results will be very wrong (since the average texelBytes for RGB_DXT1 and RGBA_DXT1 is just 0.5, for RGBA_DXT3 and RGBA_DXT5 it's 1).


Roland


------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to