Fix compilation with Large Worlds

This commit is contained in:
2026-05-07 18:27:36 +02:00
parent 4489f43777
commit 14b0fb355a
3 changed files with 20 additions and 6 deletions
+11 -4
View File
@@ -150,11 +150,18 @@ void Transform::LocalToWorldVector(const Vector3& vector, Vector3& result) const
Vector3::Transform(tmp, Orientation, result);
}
void Transform::LocalToWorld(const Vector3& point, Vector3& result) const
void Transform::LocalToWorld(const Float3& point, Float3& result) const
{
Vector3 tmp = point * Scale;
Vector3::Transform(tmp, Orientation, tmp);
Vector3::Add(tmp, Translation, result);
Float3 tmp = point * Scale;
Float3::Transform(tmp, Orientation, tmp);
Float3::Add(tmp, Translation, result);
}
void Transform::LocalToWorld(const Double3& point, Double3& result) const
{
Double3 tmp = point * Scale;
Double3::Transform(tmp, Orientation, tmp);
Double3::Add(tmp, Translation, result);
}
void Transform::WorldToLocal(const Transform& other, Transform& result) const
+8 -1
View File
@@ -219,7 +219,14 @@ public:
/// </summary>
/// <param name="point">The local space point.</param>
/// <param name="result">The world space point.</param>
void LocalToWorld(const Vector3& point, Vector3& result) const;
void LocalToWorld(const Float3& point, Float3& result) const;
/// <summary>
/// Performs transformation of the given point in local space to the world space of this transform.
/// </summary>
/// <param name="point">The local space point.</param>
/// <param name="result">The world space point.</param>
void LocalToWorld(const Double3& point, Double3& result) const;
/// <summary>
/// Performs transformation of the given transform in local space to the world space of this transform.
@@ -78,7 +78,7 @@ void ForwardShadingFeature::Bind(MaterialShader::BindParameters& params, Span<by
for (int32 i = 0; i < cache->EnvironmentProbes.Count(); i++)
{
const RenderEnvironmentProbeData& probe = cache->EnvironmentProbes.Get()[i];
const float sphereCullDistance = objectBounds.Radius + probe.Radius;
const float sphereCullDistance = (float)objectBounds.Radius + probe.Radius;
const float distanceSq = Float3::DistanceSquared(probe.Position, objectBounds.Center);
if (distanceSq <= sphereCullDistance * sphereCullDistance && distanceSq < minDistanceSq)
{