Sign in to follow this  
Geat_Masta

Is there a library to expand an image with S3TC/DXTn?

Recommended Posts

I recently realized that the textures in my game are all too small for high DPI monitors and need to be scaled up, which also would force me to use compression.  And that gave me an idea, because dxt only stores the first and last pixel in a block, and interpolates the rest, it should be possible to compress a 2x2 block instead a interpolate the rest.  Then use something like HQ2X or superXBR to scale up the alpha channel.

So I have two questions based on this concept:

How much would starting with a smaller image like this affect quality given that it's already a lossy algorithm?

Is there a library to do this that exists already, or is my best bet to modify squish?

Share this post


Link to post
Share on other sites

it should be possible to compress a 2x2 block instead a interpolate the rest.

Block sizes are not a variable. They are fixed at 4×4.

Squish only compresses, it does not upscale.
You can use my tool to both scale up and compress: http://lspiroengine.com/?p=599
Source: http://lspiroengine.com/Misc/LSDxtSrc.rar


L. Spiro Edited by L. Spiro

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this