mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-26 15:45:41 +00:00
Non luminous polygons seem to be effected by the lightModifier also. API seems to have no restriction in this regard, neither does the SDK. The ocean hunter requires this for some of the 2d stuff. Light modifier values only seem to exist between 0-16, which is strange for 5 bits of precision. Possibly top bit disables the effect and lower 4 bits are the value. This clearly differs from the SDK, but without this the values come out clearly wrong.
This commit is contained in:
parent
62eafacfc3
commit
9e279a0c1f
|
@ -887,15 +887,7 @@ void CNew3D::CacheModel(Model *m, const UINT32 *data)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (!ph.Luminous()) {
|
||||
currentMesh->fogIntensity = 1.0f;
|
||||
}
|
||||
else {
|
||||
currentMesh->fogIntensity = ph.LightModifier();
|
||||
}*/
|
||||
|
||||
currentMesh->fogIntensity = 1.0;
|
||||
|
||||
if (ph.TexEnabled()) {
|
||||
currentMesh->format = ph.TexFormat();
|
||||
|
|
|
@ -330,7 +330,7 @@ bool PolyHeader::Luminous()
|
|||
|
||||
float PolyHeader::LightModifier()
|
||||
{
|
||||
return (float)((header[6] >> 11) & 0x1F) * (1.0f / 31.0f);
|
||||
return ((header[6] >> 11) & 0x1F) * (1.0f / 16.0f);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue