PDA

View Full Version : What is GL_EXT_texture_rectangle? Why not ARB_texture_non_power_of_two in Catalyst



lodder
06-27-2004, 02:50 AM
Hi,

I just searched through my extensions (Catalyst 4.6) and found GL_EXT_texture_rectangle. But it is not listed in the Extension Registry. I guess, its the same like GL_NV_texture_rectangle. But why is there no support for ARB_texture_non_power_of_two?

Bye Enrico

Jan
06-27-2004, 05:31 AM
Yes, the EXT and the NV version are the same.

But npot-textures are much much harder to work with (for the hardware), so it needs dedicated hardware. Current hardware is not capable of handling them, so only the texture-rectangle extension is supported.

If you want to know the differences between rectangle and non-power-of-two textures, just read their specs. You will see, that rectangle textures were the first step to npot textures, but with a lot of limitations. ARB_non_power_of_two simply supports everything without limitations, but therefore only the Geforce 6 supports it yet.

Jan.

Corrail
06-27-2004, 09:35 AM
ARB_texture_non_power_of_two requires mipmap-support for npot textures which is currently only supported by GeForce series 6.

Korval
06-27-2004, 09:12 PM
Only 6xxx Geforces? What about R4xx cards? Did ATi do nothing to add functionality to their cards this go-around?

arekkusu
06-27-2004, 10:32 PM
prelim spec is here:
http://developer.apple.com/opengl/extensions/ext_texture_rectangle.html

sqrt[-1]
06-27-2004, 10:33 PM
I think the only new ATI feature is 3Dc compression (which is not exposed in OpenGL yet)

Jan
06-28-2004, 12:29 AM
Originally posted by Korval:
Only 6xxx Geforces? What about R4xx cards? Did ATi do nothing to add functionality to their cards this go-around?Except for the 3DC compression, yes.

But, well, as they said themselves, for gamers that doesn´t mean anything. They only need more speed, which the X800 delivers.
However, i am quite sure, that most developers will change to the Gf 6 in the near future, because of lots of new cool features. I will.

Jan.

Corrail
06-28-2004, 02:13 AM
And 3DC can theoretically be used on every DX9 hardware... So the only new on R4xx hardware is the lenght of the shaders (as far as i remember 1532 including vector ops, scalar ops and texture ops).

Korval
06-28-2004, 09:23 AM
So the only new on R4xx hardware is the lenght of the shaders (as far as i remember 1532 including vector ops, scalar ops and texture ops). That's all well and good, but they forgot one thing: they still have the 4-indirection limitation. Odd is the shader indeed that uses 1532 opcodes, but still fits within the 4-indirection limits.

ATi seriously slacked off this generation. I can understand that adding looping in the fragment programs would have required rearchitecting the entire fragment pipeline (as I mentioned last year, btw). But not even bothering with "minor" features like NPOT, full float-texture support, and floating-point blending, all of which are not that difficult seems lazy. But they did have the time to apply their little 3Dc format. I would have preferred floathing-point blending instead.

Humus
06-28-2004, 04:15 PM
Originally posted by sqrt[-1]:
I think the only new ATI feature is 3Dc compression (which is not exposed in OpenGL yet)There's a GL_ATI_texture_compression_3dc extension coming soon.

Humus
06-28-2004, 04:17 PM
Originally posted by Corrail:
And 3DC can theoretically be used on every DX9 hardware...No, 3Dc require hardware support that's only available on the X800.

Corrail
06-29-2004, 02:27 AM
Originally posted by Humus:

Originally posted by Corrail:
And 3DC can theoretically be used on every DX9 hardware...No, 3Dc require hardware support that's only available on the X800.You can write your own algorithm with "compresses" a 3-channel normalized Normal-Map to a 2-channel Texture Map assuming the vector has a lenght of 1. This texture can be saved as a simple 2-channel texture map. In pixel shader you then have to recompute the 3rd component. That's exactly what ATI 3Dc does, so why can't this be done on every DX9 hardware?

plasmonster
06-29-2004, 05:15 AM
I would have preferred floathing-point blending instead.Indeed. Floating-point blending alone would be worth the price of admission. But even with the GF6 it's bittersweet, since one can't easily build an engine around it unless everyone (ATi) gets onboard. Without the extra features, ATi will need some scary speed up its sleeves.

Humus
06-29-2004, 04:58 PM
Originally posted by Corrail:
You can write your own algorithm with "compresses" a 3-channel normalized Normal-Map to a 2-channel Texture Map assuming the vector has a lenght of 1. This texture can be saved as a simple 2-channel texture map. In pixel shader you then have to recompute the 3rd component. That's exactly what ATI 3Dc does, so why can't this be done on every DX9 hardware?Of course you can compute the third component yourself with any format, but that's not what 3Dc is. 3Dc is a texture compression format that packs two high-quality channels into 8bits. To decode that texture format you need hardware support.

jwatte
06-29-2004, 05:06 PM
If you have 8 bits of data, then you can look up that data in a 256-element texture, no? No matter what the quality?

And if you have two 8-bit channels, then you can map those to u,v, at the cost of one indirection, and look those up in one 256x256 texture.

In fact, going from two 8-bit values to one three-component normalized float value is a single texture look-up into a float texture with point filtering, or, if you want to avoid banding, you need another two instructions for the normalize, and you need to do four look-ups and filter yourself (because only GeForces do filtered float textures).

Anyone have a good link for reading up on 3Dc? I've only found marketing speak sofar, but would like to know the actual details.

Korval
06-29-2004, 10:38 PM
Humus, are you trying to suggest that 3Dc makes the complete and total lack of any other significant advancement in their product line OK?

As Jwatte pointed out, if we really wanted some form of vector texture compression, we could build it into our fragment programs. I can't build floating-point framebuffer blending into a fragment program; I have to device a gigantic (and slow) system to get around that lack of functionaity.

Did ATi at least add PCF lookups for shadow textures? If they added 3Dc and not a truly useful feature like PCF, screw them; I'm buying nVidia.

Humus
06-30-2004, 03:56 PM
Originally posted by jwatte:
If you have 8 bits of data, then you can look up that data in a 256-element texture, no? No matter what the quality?

And if you have two 8-bit channels, then you can map those to u,v, at the cost of one indirection, and look those up in one 256x256 texture.

In fact, going from two 8-bit values to one three-component normalized float value is a single texture look-up into a float texture with point filtering, or, if you want to avoid banding, you need another two instructions for the normalize, and you need to do four look-ups and filter yourself (because only GeForces do filtered float textures).

Anyone have a good link for reading up on 3Dc? I've only found marketing speak sofar, but would like to know the actual details.The point is that it compresses a normal map. Very much like DXTC compression. 3Dc is useful, just like DXTC is useful. DXTC isn't turned useless just because you can use RGBA8 anyway. 3Dc reduces storage space and bandwidth needs, so it will be faster than any other trick.

There are some technical details in this white paper:
http://www.ati.com/products/radeonx800/3DcWhitePaper.pdf
Or to make it short, it's like DXT5 alpha compression, but twice to get two independent channels.

Humus
06-30-2004, 04:01 PM
Korval,
I'm merely correcting the info on what 3Dc is and what it's not.

jwatte
06-30-2004, 04:12 PM
OK, so you get a pair of 4-bit palettes per block, instead of a single 8-bit palette for a whole texture. For low-frequency normal maps, I think that'll work swell.

However, I really encourage you to look into two separate normal map representations that also give you the same storage savings:

1) What I suggested above: use a palette of 256 normals, stored in a 256x1 RGBA texture; look up in that texture using a single channel (A8) texture. A lot of games ship normal maps like this, because with the right palette, it can look really good!

2) Store a height map, instead of a normal map, and derive the normal using finite differences. This has the nice feature that it can double as fake displacement map (for parallax mapping), and you can compose/add these really easily.

The white paper you point at claims that storing bump maps is inferior in detail to storing normal maps, but I argue that, with the right shader, that's not true -- in fact, the normal map was probably generated from a bump map (explicit, or implicitly created by mesh differences).

Humus
07-01-2004, 01:46 PM
Well, even if you can get down to the same storage space you'll still not get the same performance since you'll have to do two texture look-ups, of which one is a dependent texture look-up. Plus, that way you'll get worse quality. It would be comparable to using a normalizing cubemap, as opposed to normalizing with math, since the texture is limited to 8bits.

Korval
07-01-2004, 05:12 PM
I'm merely correcting the info on what 3Dc is and what it's not.Do you know if they have hardware PCF shadow lookup?

Humus
07-01-2004, 07:19 PM
I actually don't know. You may want to email devrel and ask.