Updates to texture converter and DDS code: Generates sharpened mipmaps. DDS decompression now identical to NVIDIA PS plugin (and probably most hardware). Compression lossless when possible (e.g. always for DDS->TGA->DDS), and slightly improved in other cases.

This was SVN commit r2291.
This commit is contained in:
Ykkrosh 2005-05-12 03:55:39 +00:00
parent e4d1454fd8
commit a75bf7fb1e
2 changed files with 11 additions and 3 deletions

View File

@ -21,7 +21,7 @@
#define tstring wstring
#define tstrcmp wcscmp
#define tstrrchr wcsrchr
#define tsprintf wsprintf
#define tsprintf swprintf
#define tmain wmain
#else
#define tstring string
@ -324,8 +324,15 @@ void convert(std::tstring filename, OutputFormat fmt, trool alphablock)
if (fmt == DXTn || fmt == DXT1 || fmt == DXT3 || fmt == DXT5)
{
// TODO: Do the mipmaps work better with a different scale filter?
iluBuildMipmaps();
int num = ilGetInteger(IL_NUM_MIPMAPS);
for (int n = 1; n < num; ++n)
{
ilActiveMipmap(n);
iluSharpen(2.0, 1); // TODO: alter these, to make things look as nice as possible
ilActiveMipmap(0);
}
check();
}
ilEnable(IL_FILE_OVERWRITE);

View File

@ -86,10 +86,11 @@
OutputFile="$(OutDir)/textureconv.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;..\..\..\libraries\devil\src\lib&quot;;&quot;e:\icc81\compiler80\ia32\lib&quot;"
GenerateDebugInformation="FALSE"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
OptimizeForWindows98="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>