2020-06-07 10:35:33 +04:00
|
|
|
#ifndef OPENMW_MWRENDER_FOGMANAGER_H
|
|
|
|
#define OPENMW_MWRENDER_FOGMANAGER_H
|
|
|
|
|
|
|
|
#include <osg/Vec4f>
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
2023-01-22 23:40:55 +01:00
|
|
|
struct CellVariant;
|
2020-06-07 10:35:33 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWRender
|
|
|
|
{
|
|
|
|
class FogManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FogManager();
|
|
|
|
|
2023-01-22 23:40:55 +01:00
|
|
|
void configure(float viewDistance, const ESM::CellVariant& cell);
|
2020-06-07 10:35:33 +04:00
|
|
|
void configure(float viewDistance, float fogDepth, float underwaterFog, float dlFactor, float dlOffset,
|
|
|
|
const osg::Vec4f& color);
|
|
|
|
|
|
|
|
osg::Vec4f getFogColor(bool isUnderwater) const;
|
|
|
|
float getFogStart(bool isUnderwater) const;
|
|
|
|
float getFogEnd(bool isUnderwater) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
float mLandFogStart;
|
|
|
|
float mLandFogEnd;
|
|
|
|
float mUnderwaterFogStart;
|
|
|
|
float mUnderwaterFogEnd;
|
|
|
|
osg::Vec4f mFogColor;
|
|
|
|
bool mDistantFog;
|
|
|
|
|
|
|
|
osg::Vec4f mUnderwaterColor;
|
|
|
|
float mUnderwaterWeight;
|
|
|
|
float mUnderwaterIndoorFog;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|