2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-08-14 21:11:44 +00:00
|
|
|
|
|
|
|
#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
|
|
|
|
2018-01-16 06:42:28 +00:00
|
|
|
#define CWORLDSHADOW_FEEDBACK 0
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-08-31 02:42:37 +00:00
|
|
|
class CStateManager;
|
2016-08-14 21:11:44 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CWorldShadow {
|
|
|
|
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;
|
2019-04-07 05:14:48 +00:00
|
|
|
TAreaId x80_aid = kInvalidAreaId;
|
2018-12-08 05:30:43 +00:00
|
|
|
s32 x84_lightIdx = -1;
|
|
|
|
bool x88_blurReset = true;
|
2018-01-16 06:42:28 +00:00
|
|
|
#if CWORLDSHADOW_FEEDBACK
|
2019-01-29 08:28:35 +00:00
|
|
|
rstl::optional<CTexturedQuadFilter> m_feedback;
|
2018-01-16 06:42:28 +00:00
|
|
|
#endif
|
2016-08-14 21:11:44 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CWorldShadow(u32 w, u32 h, bool rgba8);
|
|
|
|
void EnableModelProjectedShadow(const zeus::CTransform& pos, s32 lightIdx, float f1);
|
|
|
|
void DisableModelProjectedShadow();
|
|
|
|
void BuildLightShadowTexture(const CStateManager& mgr, TAreaId aid, s32 lightIdx, const zeus::CAABox& aabb,
|
|
|
|
bool motionBlur, bool lighten);
|
|
|
|
void ResetBlur();
|
2016-08-14 21:11:44 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|