Time for me to get back to some serious Celestia programming . . .
I checked in changes related to specular maps today. It's now possible to
use a separate texture for the specular mask instead of encoding it in the
alpha channel of the base texture. This is advantageous for a couple
reasons . . . First, it's simply easier to create and maintain separate
textures for the base color and specular mask. And second, there can be a
significant texture memory savings when using compressed textures, since
you can use the DXT1 format for both textures (half the size of DXT3), and
the specular mask can be lower resolution than the main texture. To use a
separate specular map just add a line like:
to an object definition in a .ssc file.
I also made it possible to use both a specular map and a bump map on a
planet. There's one important restriction that I'll fix soon in an
upcoming checkin. If either the base, specular, or bump texture have to
be split because exceed the maximum texture size of the graphics card,
then they all need to be the same size. Since this nixes one of the main
advantages of separate specular maps, it's the next thing I'll be working
on. After that comes palettized bump textures, which will give
effectively 4:1 compression.
render.cpp, regcombine.cpp, and regcombine.h were the only files
modified. Some more comet code in render.cpp snuck into this checkin as
well, but it's ifdef'd out.