Fix compilation with Large Worlds
This commit is contained in:
@@ -150,11 +150,18 @@ void Transform::LocalToWorldVector(const Vector3& vector, Vector3& result) const
|
|||||||
Vector3::Transform(tmp, Orientation, result);
|
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;
|
Float3 tmp = point * Scale;
|
||||||
Vector3::Transform(tmp, Orientation, tmp);
|
Float3::Transform(tmp, Orientation, tmp);
|
||||||
Vector3::Add(tmp, Translation, result);
|
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
|
void Transform::WorldToLocal(const Transform& other, Transform& result) const
|
||||||
|
|||||||
@@ -219,7 +219,14 @@ public:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="point">The local space point.</param>
|
/// <param name="point">The local space point.</param>
|
||||||
/// <param name="result">The world 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>
|
/// <summary>
|
||||||
/// Performs transformation of the given transform in local space to the world space of this transform.
|
/// 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++)
|
for (int32 i = 0; i < cache->EnvironmentProbes.Count(); i++)
|
||||||
{
|
{
|
||||||
const RenderEnvironmentProbeData& probe = cache->EnvironmentProbes.Get()[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);
|
const float distanceSq = Float3::DistanceSquared(probe.Position, objectBounds.Center);
|
||||||
if (distanceSq <= sphereCullDistance * sphereCullDistance && distanceSq < minDistanceSq)
|
if (distanceSq <= sphereCullDistance * sphereCullDistance && distanceSq < minDistanceSq)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user