Add a function to get the internal data for a disk light from it's feature processor (#7450)

* Add a function to get the internal data for a disk light from it's feature processor

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>

* Address PR comments. Fixed assert message, made function const.

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
monroegm-disable-blank-issue-2
rgba16f 4 years ago committed by GitHub
parent c46c558038
commit 742ea34d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -100,7 +100,8 @@ namespace AZ
//! Sets all of the the disk data for the provided LightHandle.
virtual void SetDiskData(LightHandle handle, const DiskLightData& data) = 0;
//! Get a read only copy of a disk lights data, useful for debug rendering
virtual const DiskLightData& GetDiskData(LightHandle handle) const = 0;
};
} // namespace Render
} // namespace AZ

@ -255,6 +255,13 @@ namespace AZ
UpdateShadow(handle);
}
const DiskLightData& DiskLightFeatureProcessor::GetDiskData(LightHandle handle) const
{
AZ_Assert(handle.IsValid(), "Invalid LightHandle passed to DiskLightFeatureProcessor::GetDiskData().");
return m_diskLightData.GetData(handle.GetIndex());
}
const Data::Instance<RPI::Buffer> DiskLightFeatureProcessor::GetLightBuffer()const
{
return m_lightBufferHandler.GetBuffer();

@ -58,6 +58,7 @@ namespace AZ
void SetEsmExponent(LightHandle handle, float esmExponent) override;
void SetDiskData(LightHandle handle, const DiskLightData& data) override;
const DiskLightData& GetDiskData(LightHandle handle) const override;
const Data::Instance<RPI::Buffer> GetLightBuffer()const;
uint32_t GetLightCount()const;

@ -184,8 +184,8 @@ namespace AZ
virtual void DrawDisk(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0;
//! Draw a cone.
//! @param center The center of the base circle.
//! @param direction The direction vector. The tip of the cone will point along this vector.
//! @param center The center of the cone base.
//! @param direction The direction vector. This is the vector from the center of the base to the point at the tip.
//! @param radius The radius.
//! @param height The height of the cone (the distance from the base center to the tip).
//! @param color The color to draw the cone.

Loading…
Cancel
Save