2016-08-14 21:11:44 +00:00
|
|
|
#ifndef __URDE_CWORLDSHADOW_HPP__
|
|
|
|
#define __URDE_CWORLDSHADOW_HPP__
|
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
2017-08-31 02:42:37 +00:00
|
|
|
#include "zeus/CAABox.hpp"
|
2017-10-01 04:26:46 +00:00
|
|
|
#include "Graphics/Shaders/CWorldShadowShader.hpp"
|
2016-08-14 21:11:44 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
2017-08-31 02:42:37 +00:00
|
|
|
class CStateManager;
|
2016-08-14 21:11:44 +00:00
|
|
|
|
|
|
|
class CWorldShadow
|
|
|
|
{
|
2017-10-01 04:26:46 +00:00
|
|
|
CWorldShadowShader m_shader;
|
|
|
|
zeus::CTransform x4_view;
|
|
|
|
zeus::CTransform x34_model;
|
|
|
|
float x64_objHalfExtent = 1.f;
|
|
|
|
zeus::CVector3f x68_objPos = {0.f, 1.f, 0.f};
|
|
|
|
zeus::CVector3f x74_lightPos;
|
|
|
|
TAreaId x80_aid;
|
|
|
|
s32 x84_lightIdx = -1;
|
|
|
|
bool x88_blurReset = true;
|
|
|
|
zeus::CMatrix4f m_shadowViewProj;
|
2016-08-14 21:11:44 +00:00
|
|
|
public:
|
2017-10-01 04:26:46 +00:00
|
|
|
CWorldShadow(u32 w, u32 h, bool rgba8);
|
2017-08-31 02:42:37 +00:00
|
|
|
void EnableModelProjectedShadow(const zeus::CTransform& pos, s32 lightIdx, float f1);
|
|
|
|
void DisableModelProjectedShadow();
|
|
|
|
void BuildLightShadowTexture(const CStateManager& mgr, TAreaId aid, s32 lightIdx,
|
2017-10-01 04:26:46 +00:00
|
|
|
const zeus::CAABox& aabb, bool motionBlur, bool lighten);
|
2017-08-31 02:42:37 +00:00
|
|
|
void ResetBlur();
|
2016-08-14 21:11:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CWORLDSHADOW_HPP__
|