ColorRegs for CModelFlags

This commit is contained in:
Jack Andersen 2016-07-31 20:36:51 -10:00
parent 1c64605261
commit 40e0b70d0e
4 changed files with 11 additions and 4 deletions

View File

@ -25,7 +25,8 @@ URDE_DECL_SPECIALIZE_SHADER(CSpaceWarpFilter)
void ViewManager::BuildTestPART(urde::IObjectStore& objStore)
{
m_modelTest = objStore.GetObj("gun_cmdl");
//m_modelTest = objStore.GetObj("gun_cmdl");
m_modelTest = objStore.GetObj("MP1/Shared/CMDL_B2B41738.blend");
//m_modelTest = objStore.GetObj("CMDL_GameCube");
m_modelTest.Lock();
@ -81,7 +82,9 @@ void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ)
flags.m_extendedShaderIdx = 1;
m_theta += 0.01f;
CGraphics::SetModelMatrix(zeus::CTransform::RotateZ(m_theta) * zeus::CTransform::Scale(10.f));
CGraphics::SetModelMatrix(zeus::CTransform::Translate(0.f, 0.f, -3.f) *
zeus::CTransform::RotateZ(m_theta) *
zeus::CTransform::Scale(1.f));
//CGraphics::SetModelMatrix(zeus::CTransform::Identity());
CGraphics::SetViewPointMatrix(zeus::lookAt(zeus::CVector3f{0.f, -10.f, 4.f}, {0.f, 0.f, 0.f}));
boo::SWindowRect windowRect = m_vm.m_mainWindow->getWindowFrame();
@ -97,7 +100,7 @@ void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ)
m_vm.m_modelTest->Draw(flags);
m_spaceWarpFilter.setStrength(std::sin(m_theta * 5.f) * 0.5f + 0.5f);
m_spaceWarpFilter.draw(zeus::CVector2f{0.f, 0.f});
//m_spaceWarpFilter.draw(zeus::CVector2f{0.f, 0.f});
}
if (m_vm.m_partGen)
{

View File

@ -26,6 +26,7 @@ struct CModelFlags
u16 m_flags = 0; /* Flags */
zeus::CColor color; /* Set into kcolor slot specified by material */
zeus::CColor addColor = zeus::CColor::skClear;
zeus::CColor regColors[3];
CModelFlags() = default;
CModelFlags(u8 blendMode, u8 shadIdx, u16 flags, const zeus::CColor& col)

View File

@ -518,6 +518,9 @@ void CBooModel::UpdateUniformData(const CModelFlags& flags) const
{
CModelShaders::LightingUniform& lightingOut = *reinterpret_cast<CModelShaders::LightingUniform*>(dataCur);
lightingOut = m_lightingData;
lightingOut.colorRegs[0] = flags.regColors[0];
lightingOut.colorRegs[1] = flags.regColors[1];
lightingOut.colorRegs[2] = flags.regColors[2];
}
m_uniformBuffer->unmap();

2
hecl

@ -1 +1 @@
Subproject commit 8830763583627a50b755d1e9ef4a02ec76c91c6f
Subproject commit e5a19203f99b180beb27660f480b9192ea6fcff2