Changed the DiffuseProbeGrid and ReflectionProbe components to only override the Box size if it's at the default (unit)
Signed-off-by: dmcdiar <dmcdiar@amazon.com>
This commit is contained in:
+2
-2
@@ -13,8 +13,8 @@ namespace AZ
|
||||
{
|
||||
static constexpr const char* const DiffuseProbeGridComponentTypeId = "{9B900A04-192F-4F5E-AE31-762605D8159A}";
|
||||
static constexpr const char* const EditorDiffuseProbeGridComponentTypeId = "{F80086E1-ECE7-4E8C-B727-A750D10F7D83}";
|
||||
static constexpr float DefaultDiffuseProbeGridSpacing = 4.0f;
|
||||
static constexpr float DefaultDiffuseProbeGridExtents = 20.0f;
|
||||
static constexpr float DefaultDiffuseProbeGridSpacing = 2.0f;
|
||||
static constexpr float DefaultDiffuseProbeGridExtents = 8.0f;
|
||||
static constexpr float DefaultDiffuseProbeGridAmbientMultiplier = 1.0f;
|
||||
static constexpr float DefaultDiffuseProbeGridViewBias = 0.2f;
|
||||
static constexpr float DefaultDiffuseProbeGridNormalBias = 0.1f;
|
||||
|
||||
+14
-3
@@ -169,9 +169,20 @@ namespace AZ
|
||||
|
||||
m_featureProcessor->SetMode(m_handle, m_configuration.m_runtimeMode);
|
||||
|
||||
// set box shape component dimensions from the configuration
|
||||
// this will invoke the OnShapeChanged() handler and set the outer extents on the feature processor
|
||||
m_boxShapeInterface->SetBoxDimensions(m_configuration.m_extents);
|
||||
// if this is a new DiffuseProbeGrid entity and the box shape has not been changed (i.e., it's still unit sized)
|
||||
// then use the default extents, otherwise use the current box shape extents
|
||||
AZ::Vector3 extents(0.0f);
|
||||
AZ::Vector3 boxDimensions = m_boxShapeInterface->GetBoxDimensions();
|
||||
if (m_configuration.m_entityId == EntityId::InvalidEntityId && boxDimensions == AZ::Vector3(1.0f))
|
||||
{
|
||||
extents = m_configuration.m_extents;
|
||||
}
|
||||
else
|
||||
{
|
||||
extents = boxDimensions;
|
||||
}
|
||||
|
||||
m_boxShapeInterface->SetBoxDimensions(extents);
|
||||
}
|
||||
|
||||
void DiffuseProbeGridComponentController::OnAssetReady(Data::Asset<Data::AssetData> asset)
|
||||
|
||||
+2
@@ -47,6 +47,8 @@ namespace AZ
|
||||
Data::Asset<RPI::StreamingImageAsset> m_bakedDistanceTextureAsset;
|
||||
Data::Asset<RPI::StreamingImageAsset> m_bakedRelocationTextureAsset;
|
||||
Data::Asset<RPI::StreamingImageAsset> m_bakedClassificationTextureAsset;
|
||||
|
||||
AZ::u64 m_entityId{ EntityId::InvalidEntityId };
|
||||
};
|
||||
|
||||
class DiffuseProbeGridComponentController final
|
||||
|
||||
+3
@@ -147,6 +147,9 @@ namespace AZ
|
||||
AzToolsFramework::EditorComponentSelectionRequestsBus::Handler::BusConnect(GetEntityId());
|
||||
AZ::TickBus::Handler::BusConnect();
|
||||
AzToolsFramework::EditorEntityInfoNotificationBus::Handler::BusConnect();
|
||||
|
||||
AZ::u64 entityId = (AZ::u64)GetEntityId();
|
||||
m_controller.m_configuration.m_entityId = entityId;
|
||||
}
|
||||
|
||||
void EditorDiffuseProbeGridComponent::Deactivate()
|
||||
|
||||
Reference in New Issue
Block a user