mirror of
https://github.com/XLabsProject/iw3x-port.git
synced 2023-08-02 15:02:11 +02:00
Set bothcull statebit on glass (fixes display issue on broadcast, among others)
This commit is contained in:
parent
d323c4c6bc
commit
583909584e
@ -442,6 +442,18 @@ namespace Components
|
||||
mat.constantTable = material->constantTable;
|
||||
mat.stateBitTable = material->stateBitsTable;
|
||||
|
||||
// Glass
|
||||
if (mat.surfaceTypeBits & 0b00000000000000000000000100000000)
|
||||
{
|
||||
auto index = mat.stateBitsEntry[Game::IW4::TECHNIQUE_LIT];
|
||||
auto entry = mat.stateBitTable[index];
|
||||
|
||||
entry.loadbits[0] &= ~(Game::IW3::GFXS0_CULL_MASK | Game::IW3::GFXS0_CULL_BACK | Game::IW3::GFXS0_CULL_FRONT);
|
||||
entry.loadbits[0] |= Game::IW3::GFXS0_CULL_NONE;
|
||||
|
||||
Logger::Print("Set statebit %i loadbit 0 to GFXS0_CULL_NONE on material %s (it is glass)\n", index, mat.name);
|
||||
}
|
||||
|
||||
IMaterial::SaveConvertedMaterial(&mat);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user