Add SortOrder to Environment Probe
This commit is contained in:
@@ -335,12 +335,17 @@ void ReflectionsPass::Dispose()
|
||||
|
||||
bool SortProbes(RenderEnvironmentProbeData const& p1, RenderEnvironmentProbeData const& p2)
|
||||
{
|
||||
// Compare by radius
|
||||
int32 res = static_cast<int32>(p2.Radius - p1.Radius);
|
||||
// Compare by Sort Order
|
||||
int32 res = p1.SortOrder - p2.SortOrder;
|
||||
if (res == 0)
|
||||
{
|
||||
// Compare by ID to prevent flickering
|
||||
res = p2.HashID - p1.HashID;
|
||||
// Compare by radius
|
||||
res = static_cast<int32>(p2.Radius - p1.Radius);
|
||||
if (res == 0)
|
||||
{
|
||||
// Compare by ID to prevent flickering
|
||||
res = p2.HashID - p1.HashID;
|
||||
}
|
||||
}
|
||||
return res < 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user