mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-02-17 01:45:41 +00:00
For scroll fog set the viewport to the entire area, allows fog to work in widescreen mode
This commit is contained in:
parent
ca7046729e
commit
20a9514aa2
|
@ -91,6 +91,7 @@ void CNew3D::DrawScrollFog()
|
||||||
if (n.viewport.scrollFog > 0 && n.viewport.priority == i) {
|
if (n.viewport.scrollFog > 0 && n.viewport.priority == i) {
|
||||||
|
|
||||||
float *rgb = n.viewport.fogParams;
|
float *rgb = n.viewport.fogParams;
|
||||||
|
glViewport(0, 0, m_totalXRes, m_totalYRes); // fill the whole viewport
|
||||||
m_r3dScrollFog.DrawScrollFog(rgb[0], rgb[1], rgb[2], n.viewport.scrollFog);
|
m_r3dScrollFog.DrawScrollFog(rgb[0], rgb[1], rgb[2], n.viewport.scrollFog);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -769,6 +770,9 @@ void CNew3D::RenderViewport(UINT32 addr)
|
||||||
|
|
||||||
vp->scrollFog = (float)(vpnode[0x20] & 0xFF) * (1.0f / 255.0f); // scroll fog
|
vp->scrollFog = (float)(vpnode[0x20] & 0xFF) * (1.0f / 255.0f); // scroll fog
|
||||||
|
|
||||||
|
// Unknown light/fog parameters
|
||||||
|
float scrollAtt = (float)(vpnode[0x24] & 0xFF) * (1.0f / 255.0f); // scroll attenuation
|
||||||
|
|
||||||
{
|
{
|
||||||
//test fog paramaters
|
//test fog paramaters
|
||||||
float lightFogColour[3];
|
float lightFogColour[3];
|
||||||
|
@ -789,9 +793,6 @@ void CNew3D::RenderViewport(UINT32 addr)
|
||||||
vp->fogParams[3] = vp->fogParams[4] = 0.0f;
|
vp->fogParams[3] = vp->fogParams[4] = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unknown light/fog parameters
|
|
||||||
float scrollAtt = (float)(vpnode[0x24] & 0xFF) * (1.0f / 255.0f); // scroll attenuation
|
|
||||||
|
|
||||||
// Clear texture offsets before proceeding
|
// Clear texture offsets before proceeding
|
||||||
m_nodeAttribs.Reset();
|
m_nodeAttribs.Reset();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue