Fix GasGiant clipping, fix bright spots on models

master
Webster Sheets 2021-03-26 22:42:06 -04:00
parent 829caa97bb
commit aeb5d906bb
2 changed files with 3 additions and 1 deletions

View File

@ -88,6 +88,8 @@ void main(void)
#else
vec3 vNormal = normal;
#endif
vNormal = normalize(vNormal);
//ambient only make sense with lighting
vec4 light = scene.ambient;
vec4 specular = vec4(0.0);

View File

@ -72,7 +72,7 @@ void CameraContext::EndFrame()
void CameraContext::ApplyDrawTransforms(Graphics::Renderer *r)
{
r->SetPerspectiveProjection(m_fovAng, m_width / m_height, m_zNear, m_zFar);
r->SetProjection(matrix4x4f::InfinitePerspectiveMatrix(DEG2RAD(m_fovAng), m_width / m_height, m_zNear));
r->SetTransform(matrix4x4f::Identity());
}