mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 13:55:38 +00:00
Parse out scrollfog value used for blending over the 2d background.
This commit is contained in:
parent
33e795de9b
commit
ef11990d19
|
@ -96,6 +96,7 @@ struct Viewport
|
|||
float spotRange[2]; // Z range
|
||||
float spotColor[3]; // color
|
||||
float fogParams[5]; // fog parameters (...)
|
||||
float scrollFog; // a transparency value that determines if fog is blended over the bottom 2D layer
|
||||
int x, y; // viewport coordinates (scaled and in OpenGL format)
|
||||
int width, height; // viewport dimensions (scaled for display surface size)
|
||||
int priority;
|
||||
|
|
|
@ -735,6 +735,8 @@ void CNew3D::RenderViewport(UINT32 addr)
|
|||
vp->fogParams[3] = std::abs(*(float *)&vpnode[0x23]); // fog density - ocean hunter uses negative values, but looks the same
|
||||
vp->fogParams[4] = (float)(INT16)(vpnode[0x25] & 0xFFFF)*(1.0f / 255.0f); // fog start
|
||||
|
||||
vp->scrollFog = (float)(vpnode[0x20] & 0xFF) * (1.0f / 255.0f); // scroll fog
|
||||
|
||||
{
|
||||
//test fog paramaters
|
||||
float lightFogColour[3];
|
||||
|
@ -756,11 +758,8 @@ void CNew3D::RenderViewport(UINT32 addr)
|
|||
}
|
||||
|
||||
// Unknown light/fog parameters
|
||||
float scrollFog = (float)(vpnode[0x20] & 0xFF) * (1.0f / 255.0f); // scroll fog
|
||||
float scrollAtt = (float)(vpnode[0x24] & 0xFF) * (1.0f / 255.0f); // scroll attenuation
|
||||
|
||||
printf("scroll fog scroll %f attentioatn %f ---- %f %f %f %f\n", scrollFog, scrollAtt, vp->fogParams[0], vp->fogParams[1], vp->fogParams[2], vp->fogParams[3], vp->fogParams[4]);
|
||||
|
||||
// Clear texture offsets before proceeding
|
||||
m_nodeAttribs.Reset();
|
||||
|
||||
|
|
Loading…
Reference in a new issue