mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-26 07:35:40 +00:00
Only check scroll fog value from the first viewport from each priority layer. Seems to fix problems with background fogging.
This commit is contained in:
parent
707e945db9
commit
89e75a9803
|
@ -9,10 +9,6 @@
|
|||
#define MAX_RAM_POLYS 100000
|
||||
#define MAX_ROM_POLYS 500000
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265359
|
||||
#endif
|
||||
|
||||
namespace New3D {
|
||||
|
||||
CNew3D::CNew3D()
|
||||
|
@ -94,13 +90,13 @@ void CNew3D::DrawScrollFog()
|
|||
|
||||
if (n.viewport.scrollFog > 0 && n.viewport.priority == i) {
|
||||
|
||||
if (n.viewport.fogParams[3] || n.viewport.fogParams[4]) { // check we some fog values set density or start
|
||||
|
||||
float *rgb = n.viewport.fogParams;
|
||||
m_r3dScrollFog.DrawScrollFog(rgb[0], rgb[1], rgb[2], n.viewport.scrollFog);
|
||||
|
||||
return; // only allowed once per frame?
|
||||
return;
|
||||
}
|
||||
|
||||
if (n.viewport.priority == i) {
|
||||
break; // we only want to check the first viewport from each priority level
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue