mirror of https://github.com/AxioDL/metaforce.git
View transform fix
This commit is contained in:
parent
721929e4d0
commit
c51b1face6
|
@ -45,7 +45,7 @@ class ViewManager : public Specter::IViewManager
|
||||||
{
|
{
|
||||||
m_vm.m_partGen->Update(1.0 / 60.0);
|
m_vm.m_partGen->Update(1.0 / 60.0);
|
||||||
pshag::CGraphics::SetModelMatrix(Zeus::CTransform::Identity());
|
pshag::CGraphics::SetModelMatrix(Zeus::CTransform::Identity());
|
||||||
pshag::CGraphics::SetViewPointMatrix(Zeus::CTransform::Identity() + Zeus::CVector3f(0.f, 10.f, 0.f));
|
pshag::CGraphics::SetViewPointMatrix(Zeus::CTransform::Identity() + Zeus::CVector3f(0.f, -10.f, 0.f));
|
||||||
boo::SWindowRect windowRect = m_vm.m_mainWindow->getWindowFrame();
|
boo::SWindowRect windowRect = m_vm.m_mainWindow->getWindowFrame();
|
||||||
float aspect = windowRect.size[0] / float(windowRect.size[1]);
|
float aspect = windowRect.size[0] / float(windowRect.size[1]);
|
||||||
pshag::CGraphics::SetPerspective(55.0, aspect, 0.001f, 1000.f);
|
pshag::CGraphics::SetPerspective(55.0, aspect, 0.001f, 1000.f);
|
||||||
|
|
|
@ -65,8 +65,8 @@ void CGraphics::SetViewPointMatrix(const Zeus::CTransform& xf)
|
||||||
{
|
{
|
||||||
g_ViewMatrix = xf;
|
g_ViewMatrix = xf;
|
||||||
g_ViewPoint = xf.m_origin;
|
g_ViewPoint = xf.m_origin;
|
||||||
g_GXViewPointMatrix.m_basis = g_ViewMatrix.m_basis.transposed();
|
Zeus::CMatrix3f tmp(xf.m_basis[0], xf.m_basis[2], -xf.m_basis[1]);
|
||||||
g_GXViewPointMatrix.m_origin = -g_ViewPoint;
|
g_GXViewPointMatrix = Zeus::CTransform(tmp.transposed());
|
||||||
SetViewMatrix();
|
SetViewMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ static const char* VS_GLSL_TEX =
|
||||||
" vtf.color = colorIn * moduColor;\n"
|
" vtf.color = colorIn * moduColor;\n"
|
||||||
" vtf.uv = uvsIn[gl_VertexID].xy;\n"
|
" vtf.uv = uvsIn[gl_VertexID].xy;\n"
|
||||||
" gl_Position = mvp * posIn[gl_VertexID];\n"
|
" gl_Position = mvp * posIn[gl_VertexID];\n"
|
||||||
" gl_Position = vec4(posIn[gl_VertexID].x, posIn[gl_VertexID].z, 0.0, 1.0);\n"
|
" //gl_Position = vec4(posIn[gl_VertexID].x, posIn[gl_VertexID].z, 0.0, 1.0);\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
static const char* FS_GLSL_TEX =
|
static const char* FS_GLSL_TEX =
|
||||||
|
|
Loading…
Reference in New Issue