Added comments and formatted as close to the original
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ namespace AZ
|
||||
void SetRayTracingData();
|
||||
void SetSortKey(RHI::DrawItemSortKey sortKey);
|
||||
RHI::DrawItemSortKey GetSortKey();
|
||||
void SetLodOverride( RPI::Cullable::LodOverride lodOverride);
|
||||
void SetLodOverride(RPI::Cullable::LodOverride lodOverride);
|
||||
RPI::Cullable::LodOverride GetLodOverride();
|
||||
void SetMinimumScreenCoverage(float minimumScreenCoverage);
|
||||
float GetMinimumScreenCoverage();
|
||||
|
||||
+4
-3
@@ -98,13 +98,14 @@ namespace AZ
|
||||
virtual void SetLodOverride(const MeshHandle& meshHandle, RPI::Cullable::LodOverride lodOverride) = 0;
|
||||
//! Gets the LOD override for a given mesh handle.
|
||||
virtual RPI::Cullable::LodOverride GetLodOverride(const MeshHandle& meshHandle) = 0;
|
||||
|
||||
//! Sets the minimum screen percentage for a given mesh handle. This property is the minimum screen percentage the object can take up before culled.
|
||||
virtual void SetMinimumScreenCoverage(const MeshHandle& meshHandle, float minimumScreenCoverage) = 0;
|
||||
//! Gets the minimum screen percentage for a given mesh handle.
|
||||
virtual float GetMinimumScreenCoverage(const MeshHandle& meshHandle) = 0;
|
||||
|
||||
//! Sets the quality decay rate. This property is the speed at which the quality of the mesh with degrade if you are linearly moving away.
|
||||
virtual void SetQualityDecayRate(const MeshHandle& meshHandle, float qualityDecayRate) = 0;
|
||||
//! Gets the quality decay rate.
|
||||
virtual float GetQualityDecayRate(const MeshHandle& meshHandle) = 0;
|
||||
|
||||
//! Sets the option to exclude this mesh from baked reflection probe cubemaps
|
||||
virtual void SetExcludeFromReflectionCubeMaps(const MeshHandle& meshHandle, bool excludeFromReflectionCubeMaps) = 0;
|
||||
//! Sets the option to exclude this mesh from raytracing
|
||||
|
||||
@@ -1098,7 +1098,6 @@ namespace AZ
|
||||
cullData.m_drawListMask.reset();
|
||||
|
||||
const size_t lodCount = lodAssets.size();
|
||||
|
||||
for (size_t lodIndex = 0; lodIndex < lodCount; ++lodIndex)
|
||||
{
|
||||
//initialize the lod
|
||||
@@ -1117,8 +1116,7 @@ namespace AZ
|
||||
if (lodIndex < lodAssets.size() - 1)
|
||||
{
|
||||
//first and middle lods: compute a stepdown value for the min
|
||||
lod.m_screenCoverageMin =
|
||||
AZStd::GetMax(lodData.m_qualityDecayRate * lod.m_screenCoverageMax, lodData.m_minimumScreenCoverage);
|
||||
lod.m_screenCoverageMin = AZStd::GetMax(lodData.m_qualityDecayRate * lod.m_screenCoverageMax, lodData.m_minimumScreenCoverage);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace AZ
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &MeshComponentConfig::m_minimumScreenCoverage, "Minimum Screen Coverage", "Minimum proportion of screen area an entitiy takes up, after that the entitiy is culled.")
|
||||
->Attribute(AZ::Edit::Attributes::Min, 0.f)
|
||||
->Attribute(AZ::Edit::Attributes::Max, 1.f)
|
||||
->Attribute(AZ::Edit::Attributes::Suffix, " percent")
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &MeshComponentConfig::m_qualityDecayRate, "Quality Decay Rate",
|
||||
"Rate at which mesh quality decays (0 -> always stay highest quality, 1 -> quality falls off to lowest quality immediately).")
|
||||
->Attribute(AZ::Edit::Attributes::Min, 0.f)
|
||||
|
||||
@@ -101,6 +101,7 @@ namespace AZ
|
||||
|
||||
void SetMinimumScreenCoverage(float minimumScreenCoverage) override;
|
||||
float GetMinimumScreenCoverage() const override;
|
||||
|
||||
void SetQualityDecayRate(float qualityDecayRate) override;
|
||||
float GetQualityDecayRate() const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user