Fixes for large worlds
This commit is contained in:
@@ -196,7 +196,7 @@ void Model::Draw(const RenderContext& renderContext, MaterialBase* material, con
|
||||
const BoundingBox box = GetBox(world);
|
||||
BoundingSphere sphere;
|
||||
BoundingSphere::FromBox(box, sphere);
|
||||
int32 lodIndex = RenderTools::ComputeModelLOD(this, sphere.Center, (float)sphere.Radius, renderContext); // TODO: large-worlds
|
||||
int32 lodIndex = RenderTools::ComputeModelLOD(this, sphere.Center - renderContext.View.Origin, (float)sphere.Radius, renderContext);
|
||||
if (lodIndex == -1)
|
||||
return;
|
||||
lodIndex += renderContext.View.ModelLODBias;
|
||||
|
||||
Reference in New Issue
Block a user