Kaynağa Gözat

Set initial lighting preset to Palermo Sidewalk (#291)

Signed-off-by: dmcdiar <[email protected]>
dmcdiarmid-ly 3 yıl önce
ebeveyn
işleme
c2c170b748
1 değiştirilmiş dosya ile 12 ekleme ve 0 silme
  1. 12 0
      Gem/Code/Source/CommonSampleComponentBase.cpp

+ 12 - 0
Gem/Code/Source/CommonSampleComponentBase.cpp

@@ -91,6 +91,18 @@ namespace AtomSampleViewer
             }
             }
         }
         }
 
 
+        // set the initial lighting preset
+        static const char* InitialLightingPresetName = "Palermo Sidewalk";
+        for (uint32_t index = 0; index < m_lightingPresets.size(); ++index)
+        {
+            if (m_lightingPresets[index].m_displayName == InitialLightingPresetName)
+            {
+                m_currentLightingPresetIndex = index;
+                OnLightingPresetSelected(m_lightingPresets[m_currentLightingPresetIndex], m_useAlternateSkybox);
+                break;
+            }
+        }
+
         AZ::TransformNotificationBus::MultiHandler::BusConnect(m_cameraEntityId);
         AZ::TransformNotificationBus::MultiHandler::BusConnect(m_cameraEntityId);
         AZ::EntityBus::MultiHandler::BusConnect(m_postProcessEntity->GetId());
         AZ::EntityBus::MultiHandler::BusConnect(m_postProcessEntity->GetId());
     }
     }