Fix regression on Large Worlds build and bunch of warnings
This commit is contained in:
@@ -69,10 +69,12 @@ API_STRUCT(InBuild) struct FLAXENGINE_API VariantType
|
||||
|
||||
MAX,
|
||||
#if USE_LARGE_WORLDS
|
||||
Real = Double,
|
||||
Vector2 = Double2,
|
||||
Vector3 = Double3,
|
||||
Vector4 = Double4,
|
||||
#else
|
||||
Real = Float,
|
||||
Vector2 = Float2,
|
||||
Vector3 = Float3,
|
||||
Vector4 = Float4,
|
||||
|
||||
@@ -198,7 +198,7 @@ void Foliage::DrawCluster(DrawContext& context, FoliageCluster* cluster, DrawCal
|
||||
sphere.Center -= context.ViewOrigin;
|
||||
if (Float3::Distance(context.LodView.Position, sphere.Center) - (float)sphere.Radius < instance.CullDistance &&
|
||||
context.RenderContext.View.CullingFrustum.Intersects(sphere) &&
|
||||
RenderTools::ComputeBoundsScreenRadiusSquared(sphere.Center, sphere.Radius, context.RenderContext.View) * context.ViewScreenSizeSq >= context.MinObjectPixelSizeSq)
|
||||
RenderTools::ComputeBoundsScreenRadiusSquared(sphere.Center, (float)sphere.Radius, context.RenderContext.View) * context.ViewScreenSizeSq >= context.MinObjectPixelSizeSq)
|
||||
{
|
||||
const auto modelFrame = instance.DrawState.PrevFrame + 1;
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@ namespace
|
||||
return;
|
||||
Spline::Keyframe* prev = spline->Curve.GetKeyframes().Get();
|
||||
Vector3 prevPos = transform.LocalToWorld(prev->Value.Translation);
|
||||
float distance = Vector3::Distance(prevPos, DebugDraw::GetViewPos());
|
||||
Real distance = Vector3::Distance(prevPos, DebugDraw::GetViewPos());
|
||||
if (distance < METERS_TO_UNITS(800)) // 800m
|
||||
{
|
||||
// Bezier curve
|
||||
|
||||
@@ -425,7 +425,7 @@ void GBufferPass::DrawSky(RenderContext& renderContext, GPUContext* context)
|
||||
BoundingSphere frustumBounds;
|
||||
renderContext.View.CullingFrustum.GetSphere(frustumBounds);
|
||||
origin = frustumBounds.Center;
|
||||
size = frustumBounds.Radius;
|
||||
size = (float)frustumBounds.Radius;
|
||||
}
|
||||
Matrix::Scaling(size / ((float)box.GetSize().Y * 0.5f) * 0.95f, m1); // Scale to fit whole view frustum
|
||||
Matrix::CreateWorld(origin, Float3::Up, Float3::Backward, m2); // Rotate sphere model
|
||||
|
||||
@@ -704,7 +704,7 @@ void RenderList::AddDrawCall(const RenderContextBatch& renderContextBatch, DrawP
|
||||
if (drawModes != DrawPass::None &&
|
||||
(staticFlags & renderContext.View.StaticFlagsMask) == renderContext.View.StaticFlagsCompare &&
|
||||
renderContext.View.CullingFrustum.Intersects(bounds) &&
|
||||
RenderTools::ComputeBoundsScreenRadiusSquared(bounds.Center, bounds.Radius, renderContext.View) * (renderContext.View.ScreenSize.X * renderContext.View.ScreenSize.Y) >= minObjectPixelSizeSq)
|
||||
RenderTools::ComputeBoundsScreenRadiusSquared(bounds.Center, (float)bounds.Radius, renderContext.View) * (renderContext.View.ScreenSize.X * renderContext.View.ScreenSize.Y) >= minObjectPixelSizeSq)
|
||||
{
|
||||
renderContext.List->ShadowDepthDrawCallsList.Indices.Add(index);
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ bool ModelTool::GenerateModelSDF(Model* inputModel, const ModelData* modelData,
|
||||
minDistance *= -1; // Voxel is inside the geometry so turn it into negative distance to the surface
|
||||
|
||||
const int32 xAddress = x + yAddress;
|
||||
formatWrite(voxels.Get() + xAddress * formatStride, minDistance * encodeMAD.X + encodeMAD.Y);
|
||||
formatWrite(voxels.Get() + xAddress * formatStride, (float)minDistance * encodeMAD.X + encodeMAD.Y);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -230,7 +230,7 @@ namespace Flax.Build.Bindings
|
||||
case "uint32": return "VariantType(VariantType::Uint)";
|
||||
case "int64": return "VariantType(VariantType::Int64)";
|
||||
case "uint64": return "VariantType(VariantType::Uint64)";
|
||||
case "Real":
|
||||
case "Real": return "VariantType(VariantType::Real)";
|
||||
case "float": return "VariantType(VariantType::Float)";
|
||||
case "double": return "VariantType(VariantType::Double)";
|
||||
case "StringAnsiView":
|
||||
|
||||
Reference in New Issue
Block a user