float fDeltaY ;
float CameraHeight;
float WorldPosHeight;
float fFogTop;
float fFogBottom;
if(CameraHeight > fFogTop)
{
if (WorldPosHeight > fFogTop) //
{
fDeltaY = 0.0f;
}
else
{
if( WorldPosHeight > fFogBottom)//fFogBottom< WorldPosHeight <fFogTop
{
fDeltaY = fFogTop - WorldPosHeight;
}
else //WorldPosHeight< fFogBottom
{
fDeltaY = fFogTop - fFogBottom;
}
}
}
else
{
if( CameraHeight > fFogBottom)
{
if (WorldPosHeight > fFogTop)
{
fDeltaY =fFogTop - CameraHeight;
}
else
{
if( WorldPosHeight > fFogBottom)//fFogBottom< WorldPosHeight <fFogTop
{
fDeltaY = WorldPosHeight - CameraHeight;
}
else //WorldPosHeight< fFogBottom
{
fDeltaY = fFogBottom -CameraHeight;
}
}
}
else//CameraHeight < fFogBottom
{
if (WorldPosHeight > fFogTop)
{
fDeltaY = fFogTop - fFogBottom;
}
else
{
if( WorldPosHeight > fFogBottom) //fFogBottom< WorldPosHeight <fFogTop
{
fDeltaY = WorldPosHeight - fFogBottom;
}
else //WorldPosHeight< fFogBottom
{
fDeltaY = 0.0f;
}
}
}
}
layer
最新推荐文章于 2023-05-18 13:55:37 发布