2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 09: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

@@ -705,7 +705,7 @@ void CBooRenderer::EnablePVS(const CPVSVisSet& set, u32 areaIdx) {
void CBooRenderer::DisablePVS() { xc8_pvs = rstl::nullopt; }
void CBooRenderer::UpdateAreaUniforms(int areaIdx, bool shadowRender, bool activateLights) {
void CBooRenderer::UpdateAreaUniforms(int areaIdx, bool shadowRender, bool activateLights, int cubeFace) {
SetupRendererStates();
CModelFlags flags;
@@ -716,7 +716,7 @@ void CBooRenderer::UpdateAreaUniforms(int areaIdx, bool shadowRender, bool activ
bufIdx = 1;
} else {
flags.m_extendedShader = EExtendedShader::Lighting;
bufIdx = 0;
bufIdx = cubeFace == -1 ? 0 : 2 + cubeFace;
}
for (CAreaListItem& item : x1c_areaListItems) {
@@ -724,7 +724,7 @@ void CBooRenderer::UpdateAreaUniforms(int areaIdx, bool shadowRender, bool activ
continue;
item.m_shaderSet->m_geomLayout->Update(flags, nullptr, nullptr, &item.m_shaderSet->m_matSet,
item.m_shaderSet->m_geomLayout->m_sharedBuffer[bufIdx], nullptr);
item.m_shaderSet->m_geomLayout->GetSharedBuffer(bufIdx), nullptr);
for (auto it = item.x10_models.begin(); it != item.x10_models.end(); ++it) {
CBooModel* model = *it;