- fixed: The software renderer was accessing the global viewpoint in several places.

Aside from using incorrect values this could crash the renderer if used in the very first rendering frame because the software renderer always operates on a copy.
This commit is contained in:
Christoph Oelckers 2019-05-12 09:16:17 +02:00
commit cf58666708
5 changed files with 9 additions and 9 deletions

View file

@ -53,7 +53,7 @@ void PolyRenderModel(PolyRenderThread *thread, const Mat4f &worldToClip, uint32_
renderer.Translation = actor->Translation;
renderer.AddLights(actor);
renderer.RenderModel(x, y, z, smf, actor, r_viewpoint.TicFrac);
renderer.RenderModel(x, y, z, smf, actor, PolyRenderer::Instance()->Viewpoint.TicFrac);
PolyTriangleDrawer::SetModelVertexShader(thread->DrawQueue, -1, -1, 0.0f);
PolyTriangleDrawer::SetTransform(thread->DrawQueue, thread->FrameMemory->NewObject<Mat4f>(worldToClip), nullptr);
}