mirror of https://github.com/AxioDL/metaforce.git
Better lighting for testing model shading
This commit is contained in:
parent
49d12162f5
commit
238c470bfd
|
@ -77,9 +77,10 @@ void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ)
|
|||
{
|
||||
CModelFlags flags;
|
||||
|
||||
flags.m_extendedShaderIdx = 2;
|
||||
if (std::fmod(m_theta, M_PIF) < M_PIF / 2.f)
|
||||
flags.m_extendedShaderIdx = 1;
|
||||
//flags.m_extendedShaderIdx = 2;
|
||||
//if (std::fmod(m_theta, M_PIF) < M_PIF / 2.f)
|
||||
// flags.m_extendedShaderIdx = 1;
|
||||
|
||||
m_theta += 0.01f;
|
||||
CGraphics::SetModelMatrix(zeus::CTransform::Translate(0.f, 0.f, -3.f) *
|
||||
|
@ -91,16 +92,15 @@ void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ)
|
|||
float aspect = windowRect.size[0] / float(windowRect.size[1]);
|
||||
CGraphics::SetPerspective(55.0, aspect, 0.1f, 1000.f);
|
||||
|
||||
std::vector<CLight> lights = {CLight::BuildLocalAmbient({}, {0.5f, 0.5f, 0.5f, 1.f}),
|
||||
CLight::BuildCustom({0.f, -20.f, 10.f}, {0.f, 1.f, 0.f},
|
||||
{200.f, 200.f, 200.f}, 0.f, 0.f, 1.f, 1.f, 0.f, 0.f),
|
||||
CLight::BuildDirectional({0.f, 0.f, -1.f}, {0.3f, 0.3f, 0.3f})};
|
||||
std::vector<CLight> lights = {CLight::BuildLocalAmbient({}, {0.05f, 0.05f, 0.05f, 1.f}),
|
||||
CLight::BuildCustom({5.f, -20.f, 10.f}, {0.f, 1.f, 0.f},
|
||||
{200.f, 200.f, 200.f}, 0.f, 0.f, 1.f, 1.f, 0.f, 0.f)};
|
||||
//lights = {CLight::BuildLocalAmbient({}, {1.0f, 0.0f, 0.0f, 1.f})};
|
||||
m_vm.m_modelTest->GetInstance().ActivateLights(lights);
|
||||
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)
|
||||
{
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 3ec49ec0c30c7998ce4f72dcd5b08743150e9cb7
|
||||
Subproject commit 089e1bd167135f24b2c2bb972f4616bd761d2f2e
|
Loading…
Reference in New Issue