forked from 0ad/0ad
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:
parent
e4d1454fd8
commit
a75bf7fb1e
@ -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);
|
||||
|
@ -86,10 +86,11 @@
|
||||
OutputFile="$(OutDir)/textureconv.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""..\..\..\libraries\devil\src\lib";"e:\icc81\compiler80\ia32\lib""
|
||||
GenerateDebugInformation="FALSE"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
|
Loading…
Reference in New Issue
Block a user