s3tc tools / sample code?

Posts: 1,234
Joined: 2002.10
Post: #1
(asking again in GL forum where it belongs...)

10.2.5 adds OpenGL support for s3tc. Can someone with experience using compressed textures comment on:

a) limitations (I see the EXT spec at apple, but what's the real life downside... support for clamping/wrapping/rectangles? I assume render-to-texture is incompatible :)

b) performance hit (sure it'll be faster overall if you reduce AGP swaps but is there any slowdown from decompression of the same texture used repeatedly in a scene? A doc at the nvidia site implies that overall rendering is faster due to decreased bandwidth needs, but this is counterintuitive since the hardware would be doing a lot more interpolation to decompress on the fly...)

c) tools (os x native tools to convert from .png or whatever to the various s3tc formats? sample code showing usage?)

Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
(reposting my answer from the other forum for completeness)

The advantage you gain is in bandwidth saved uploading the texture to VRAM.

The disadvantage is that compression artifacts are often noticeable.

My understanding is that the various s3tc compressions are all fixed-ratio compressions, and therefore that texturing can and does occur directly from the compressed image.

I don't know of any OSX-native tools that can read or write the format. My understanding is that S3TC is the same as (one of?) the various DXT (DirectX texture compression) algorithms, and therefore that tools designed to work with DDS files (such as the DevIL library) should work with S3TC. But I don't know.
Quote this message in a reply
Post: #3
S3TC is equivalent to DXTC.

a) The limitations of the format is that it is very costly to modify the texture (making render-to-texture impossible). Some textures also tend to compress with artifacts (as OSC stated). Otherwise it should act just like a normal texture.

b) Texture decompression is actually pretty simple in hardware (or I've been told it is) so using compressed textures is actually faster overall due to the decreased memory bandwidth.

c) Unfortunately source code for S3TC or DXTC is difficult to find on any platform.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Sample Code Apple removed? SaxMan 12 9,528 Jan 17, 2009 05:26 PM
Last Post: AnotherJake
  FBO sample code posted arekkusu 5 5,969 Sep 20, 2006 09:23 PM
Last Post: Frank C.
  How to read an iTunes playlist, sample code TomorrowPlusX 4 6,978 Sep 9, 2005 11:06 PM
Last Post: LongJumper
  Opengl S3TC alert 1 4,403 Dec 16, 2004 12:42 PM
Last Post: OneSadCookie
  TextureRange sample Red Marble Game 1 3,697 Dec 9, 2004 12:04 PM
Last Post: arekkusu