Set correct DXT5n swizzle code.
Select swizzle codes in nvtt instead of nvimage.
This commit is contained in:
@ -639,15 +639,7 @@ void DDSHeader::setFourCC(uint8 c0, uint8 c1, uint8 c2, uint8 c3)
|
||||
this->pf.flags = DDPF_FOURCC;
|
||||
this->pf.fourcc = MAKEFOURCC(c0, c1, c2, c3);
|
||||
|
||||
if (this->pf.fourcc == FOURCC_ATI2)
|
||||
{
|
||||
this->pf.bitcount = FOURCC_A2XY;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->pf.bitcount = 0;
|
||||
}
|
||||
|
||||
this->pf.bitcount = 0;
|
||||
this->pf.rmask = 0;
|
||||
this->pf.gmask = 0;
|
||||
this->pf.bmask = 0;
|
||||
@ -667,6 +659,11 @@ void DDSHeader::setFormatCode(uint32 code)
|
||||
this->pf.amask = 0;
|
||||
}
|
||||
|
||||
void DDSHeader::setSwizzleCode(uint8 c0, uint8 c1, uint8 c2, uint8 c3)
|
||||
{
|
||||
this->pf.bitcount = MAKEFOURCC(c0, c1, c2, c3);
|
||||
}
|
||||
|
||||
|
||||
void DDSHeader::setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask)
|
||||
{
|
||||
|
@ -94,6 +94,7 @@ namespace nv
|
||||
void setPitch(uint pitch);
|
||||
void setFourCC(uint8 c0, uint8 c1, uint8 c2, uint8 c3);
|
||||
void setFormatCode(uint code);
|
||||
void setSwizzleCode(uint8 c0, uint8 c1, uint8 c2, uint8 c3);
|
||||
void setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask);
|
||||
void setDX10Format(uint format);
|
||||
void setNormalFlag(bool b);
|
||||
|
Reference in New Issue
Block a user