mirror of https://github.com/AxioDL/metaforce.git
Implement GX-style faked directional
This commit is contained in:
parent
c26a288a8c
commit
909baea2cd
|
@ -74,8 +74,9 @@ void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ)
|
|||
CGraphics::SetPerspective(55.0, aspect, 0.001f, 1000.f);
|
||||
|
||||
std::vector<CLight> lights = {CLight::BuildLocalAmbient({}, {0.5f, 0.5f, 0.5f, 1.f}),
|
||||
CLight::BuildCustom({0.f, -2.f, 1.f}, {0.f, 1.f, 0.f},
|
||||
{20.f, 20.f, 20.f, 1.f}, 0.f, 0.f, 1.f, 1.f, 0.f, 0.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})};
|
||||
m_vm.m_modelTest->GetInstance().ActivateLights(lights);
|
||||
m_vm.m_modelTest->Draw(flags);
|
||||
}
|
||||
|
|
|
@ -215,6 +215,9 @@ void CBooModel::ActivateLights(const std::vector<CLight>& lights)
|
|||
lightOut.angAtt[0] = light.x30_angleC;
|
||||
lightOut.angAtt[1] = light.x34_angleL;
|
||||
lightOut.angAtt[2] = light.x38_angleQ;
|
||||
|
||||
if (light.x1c_type == ELightType::Directional)
|
||||
lightOut.pos = (-lightOut.dir) * 1048576.f;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
|
|
Loading…
Reference in New Issue