|
|
@ -487,6 +487,8 @@ static void renderSkyPart(UScene::TRenderPart renderPart, TSkyMode skyMode)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************************************************************
|
|
|
|
|
|
|
|
// Utility to force full detail
|
|
|
|
struct CForceFullDetail
|
|
|
|
struct CForceFullDetail
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
@ -519,8 +521,16 @@ private:
|
|
|
|
};
|
|
|
|
};
|
|
|
|
static CForceFullDetail s_ForceFullDetail;
|
|
|
|
static CForceFullDetail s_ForceFullDetail;
|
|
|
|
|
|
|
|
|
|
|
|
void renderScene(bool forceFullDetail)
|
|
|
|
void renderScene(bool forceFullDetail, bool bloom)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (bloom)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// set bloom parameters before applying bloom effect
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().setSquareBloom(ClientCfg.SquareBloom);
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().setDensityBloom((uint8)ClientCfg.DensityBloom);
|
|
|
|
|
|
|
|
// init bloom
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().initBloom();
|
|
|
|
|
|
|
|
}
|
|
|
|
if (forceFullDetail)
|
|
|
|
if (forceFullDetail)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
s_ForceFullDetail.backup();
|
|
|
|
s_ForceFullDetail.backup();
|
|
|
@ -531,21 +541,18 @@ void renderScene(bool forceFullDetail)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
s_ForceFullDetail.restore();
|
|
|
|
s_ForceFullDetail.restore();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bloom)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// apply bloom effect
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().endBloom();
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().endInterfacesDisplayBloom();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************************************************************
|
|
|
|
// ***************************************************************************************************************************
|
|
|
|
// Render all scenes
|
|
|
|
// Render all scenes
|
|
|
|
void renderScene()
|
|
|
|
void renderScene()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (ClientCfg.Bloom)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// set bloom parameters before applying bloom effect
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().setSquareBloom(ClientCfg.SquareBloom);
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().setDensityBloom((uint8)ClientCfg.DensityBloom);
|
|
|
|
|
|
|
|
// init bloom
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().initBloom();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
H_AUTO_USE ( RZ_Client_Main_Loop_Sky_And_Weather )
|
|
|
|
H_AUTO_USE ( RZ_Client_Main_Loop_Sky_And_Weather )
|
|
|
|
|
|
|
|
|
|
|
@ -673,10 +680,6 @@ void renderScene()
|
|
|
|
|
|
|
|
|
|
|
|
// reset depth range
|
|
|
|
// reset depth range
|
|
|
|
Driver->setDepthRange(0.f, CANOPY_DEPTH_RANGE_START);
|
|
|
|
Driver->setDepthRange(0.f, CANOPY_DEPTH_RANGE_START);
|
|
|
|
|
|
|
|
|
|
|
|
// apply bloom effect
|
|
|
|
|
|
|
|
if (ClientCfg.Bloom)
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().endBloom();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1539,6 +1542,14 @@ bool mainLoop()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ClientCfg.Bloom)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// set bloom parameters before applying bloom effect
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().setSquareBloom(ClientCfg.SquareBloom);
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().setDensityBloom((uint8)ClientCfg.DensityBloom);
|
|
|
|
|
|
|
|
// init bloom
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().initBloom();
|
|
|
|
|
|
|
|
}
|
|
|
|
// nb : force full detail if a screenshot is asked
|
|
|
|
// nb : force full detail if a screenshot is asked
|
|
|
|
// todo : move outside render code
|
|
|
|
// todo : move outside render code
|
|
|
|
bool fullDetail = ScreenshotRequest != ScreenshotRequestNone && ClientCfg.ScreenShotFullDetail;
|
|
|
|
bool fullDetail = ScreenshotRequest != ScreenshotRequestNone && ClientCfg.ScreenShotFullDetail;
|
|
|
@ -1547,11 +1558,19 @@ bool mainLoop()
|
|
|
|
s_ForceFullDetail.backup();
|
|
|
|
s_ForceFullDetail.backup();
|
|
|
|
s_ForceFullDetail.set();
|
|
|
|
s_ForceFullDetail.set();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Render scene
|
|
|
|
renderScene();
|
|
|
|
renderScene();
|
|
|
|
|
|
|
|
|
|
|
|
if (fullDetail)
|
|
|
|
if (fullDetail)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
s_ForceFullDetail.restore();
|
|
|
|
s_ForceFullDetail.restore();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ClientCfg.Bloom)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// apply bloom effect
|
|
|
|
|
|
|
|
CBloomEffect::getInstance().endBloom();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// for that frame and
|
|
|
|
// for that frame and
|
|
|
|
// tmp : display height grid
|
|
|
|
// tmp : display height grid
|
|
|
|