3
0

SkyAtmosphereComponentConfig.cpp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AtomLyIntegration/CommonFeatures/SkyAtmosphere/SkyAtmosphereComponentConfig.h>
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. namespace AZ::Render
  11. {
  12. void SkyAtmosphereComponentConfig::Reflect(ReflectContext* context)
  13. {
  14. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  15. {
  16. serializeContext->Class<SkyAtmosphereComponentConfig, ComponentConfig>()
  17. ->Version(2)
  18. ->Field("OriginMode", &SkyAtmosphereComponentConfig::m_originMode)
  19. ->Field("AtmosphereHeight", &SkyAtmosphereComponentConfig::m_atmosphereHeight)
  20. ->Field("GroundAlbedo", &SkyAtmosphereComponentConfig::m_groundAlbedo)
  21. ->Field("GroundRadius", &SkyAtmosphereComponentConfig::m_groundRadius)
  22. ->Field("LuminanceFactor", &SkyAtmosphereComponentConfig::m_luminanceFactor)
  23. ->Field("DrawSun", &SkyAtmosphereComponentConfig::m_drawSun)
  24. ->Field("SunColor", &SkyAtmosphereComponentConfig::m_sunColor)
  25. ->Field("SunLuminanceFactor", &SkyAtmosphereComponentConfig::m_sunLuminanceFactor)
  26. ->Field("SunLimbColor", &SkyAtmosphereComponentConfig::m_sunLimbColor)
  27. ->Field("SunOrientation", &SkyAtmosphereComponentConfig::m_sun)
  28. ->Field("SunRadiusFactor", &SkyAtmosphereComponentConfig::m_sunRadiusFactor)
  29. ->Field("SunFalloffFactor", &SkyAtmosphereComponentConfig::m_sunFalloffFactor)
  30. ->Field("MinSamples", &SkyAtmosphereComponentConfig::m_minSamples)
  31. ->Field("MaxSamples", &SkyAtmosphereComponentConfig::m_maxSamples)
  32. ->Field("MieAbsorption", &SkyAtmosphereComponentConfig::m_mieAbsorption)
  33. ->Field("MieAbsorptionScale", &SkyAtmosphereComponentConfig::m_mieAbsorptionScale)
  34. ->Field("MieScattering", &SkyAtmosphereComponentConfig::m_mieScattering)
  35. ->Field("MieScatteringScale", &SkyAtmosphereComponentConfig::m_mieScatteringScale)
  36. ->Field("MieExpDistribution", &SkyAtmosphereComponentConfig::m_mieExponentialDistribution)
  37. ->Field("Absorption", &SkyAtmosphereComponentConfig::m_absorption)
  38. ->Field("AbsorptionScale", &SkyAtmosphereComponentConfig::m_absorptionScale)
  39. ->Field("RayleighScattering", &SkyAtmosphereComponentConfig::m_rayleighScattering)
  40. ->Field("RayleighScatteringScale", &SkyAtmosphereComponentConfig::m_rayleighScatteringScale)
  41. ->Field("RayleighExpDistribution", &SkyAtmosphereComponentConfig::m_rayleighExponentialDistribution)
  42. ->Field("ShadowsEnabled", &SkyAtmosphereComponentConfig::m_shadowsEnabled)
  43. ->Field("FastSkyEnabled", &SkyAtmosphereComponentConfig::m_fastSkyEnabled)
  44. ->Field("NearClip", &SkyAtmosphereComponentConfig::m_nearClip)
  45. ->Field("NearFadeDistance", &SkyAtmosphereComponentConfig::m_nearFadeDistance)
  46. ->Field("FastAerialPerspectiveEnabled", &SkyAtmosphereComponentConfig::m_fastAerialPerspectiveEnabled)
  47. ->Field("AerialPerspectiveEnabled", &SkyAtmosphereComponentConfig::m_aerialPerspectiveEnabled)
  48. ->Field("AerialDepthFactor", &SkyAtmosphereComponentConfig::m_aerialDepthFactor)
  49. ;
  50. }
  51. }
  52. } // AZ::Render