2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 03:47:43 +00:00

Support for rendering dynamic cubemaps

This commit is contained in:
Jack Andersen
2019-05-31 17:41:01 -10:00
parent 486c925a45
commit 410d7896f7
23 changed files with 372 additions and 54 deletions

View File

@@ -31,6 +31,33 @@ bool CGraphics::g_IsGXModelMatrixIdentity = true;
SViewport g_Viewport = {0, 0, 640, 480, 640 / 2.f, 480 / 2.f};
u32 CGraphics::g_FrameCounter = 0;
const zeus::CMatrix3f CGraphics::skCubeBasisMats[] = {
/* Right */
{0.f, 1.f, 0.f,
1.f, 0.f, 0.f,
0.f, 0.f, -1.f},
/* Left */
{0.f, -1.f, 0.f,
-1.f, 0.f, 0.f,
0.f, 0.f, -1.f},
/* Up */
{1.f, 0.f, 0.f,
0.f, 0.f, -1.f,
0.f, 1.f, 0.f},
/* Down */
{1.f, 0.f, 0.f,
0.f, 0.f, 1.f,
0.f, -1.f, 0.f},
/* Back */
{1.f, 0.f, 0.f,
0.f, -1.f, 0.f,
0.f, 0.f, -1.f},
/* Forward */
{-1.f, 0.f, 0.f,
0.f, 1.f, 0.f,
0.f, 0.f, -1.f},
};
void CGraphics::DisableAllLights() {
g_NumLightsActive = 0;
g_LightActive = ERglLightBits::None;