Module.cpp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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 <AzCore/Memory/SystemAllocator.h>
  9. #include <AzCore/RTTI/RTTI.h>
  10. #include <AzCore/Module/Module.h>
  11. #include <CommonFeaturesSystemComponent.h>
  12. #include <CoreLights/AreaLightComponent.h>
  13. #include <CoreLights/DirectionalLightComponent.h>
  14. #include <CubeMapCapture/CubeMapCaptureComponent.h>
  15. #include <Debug/RayTracingDebugComponent.h>
  16. #include <Debug/RenderDebugComponent.h>
  17. #include <Decals/DecalComponent.h>
  18. #include <Grid/GridComponent.h>
  19. #include <ImageBasedLights/ImageBasedLightComponent.h>
  20. #include <Material/MaterialComponent.h>
  21. #include <Mesh/MeshComponent.h>
  22. #include <ReflectionProbe/ReflectionProbeComponent.h>
  23. #include <SpecularReflections/SpecularReflectionsComponent.h>
  24. #include <OcclusionCullingPlane/OcclusionCullingPlaneComponent.h>
  25. #include <PostProcess/PostFxLayerComponent.h>
  26. #include <PostProcess/Bloom/BloomComponent.h>
  27. #include <PostProcess/ColorGrading/HDRColorGradingComponent.h>
  28. #include <PostProcess/DepthOfField/DepthOfFieldComponent.h>
  29. #include <PostProcess/DisplayMapper/DisplayMapperComponent.h>
  30. #include <PostProcess/ExposureControl/ExposureControlComponent.h>
  31. #include <PostProcess/Ssao/SsaoComponent.h>
  32. #include <PostProcess/LookModification/LookModificationComponent.h>
  33. #include <PostProcess/RadiusWeightModifier/RadiusWeightModifierComponent.h>
  34. #include <PostProcess/ShapeWeightModifier/ShapeWeightModifierComponent.h>
  35. #include <PostProcess/GradientWeightModifier/GradientWeightModifierComponent.h>
  36. #include <PostProcess/ChromaticAberration/ChromaticAberrationComponent.h>
  37. #include <PostProcess/PaniniProjection/PaniniProjectionComponent.h>
  38. #include <PostProcess/FilmGrain/FilmGrainComponent.h>
  39. #include <PostProcess/WhiteBalance/WhiteBalanceComponent.h>
  40. #include <PostProcess/Vignette/VignetteComponent.h>
  41. #include <ScreenSpace/DeferredFogComponent.h>
  42. #include <SkyAtmosphere/SkyAtmosphereComponent.h>
  43. #include <SkyBox/HDRiSkyboxComponent.h>
  44. #include <SkyBox/PhysicalSkyComponent.h>
  45. #include <Scripting/EntityReferenceComponent.h>
  46. #include <SurfaceData/SurfaceDataMeshComponent.h>
  47. #include <Animation/AttachmentComponent.h>
  48. #ifdef ATOMLYINTEGRATION_FEATURE_COMMON_EDITOR
  49. #include <EditorCommonFeaturesSystemComponent.h>
  50. #include <PostProcess/EditorPostFxSystemComponent.h>
  51. #include <CoreLights/EditorAreaLightComponent.h>
  52. #include <CoreLights/EditorDirectionalLightComponent.h>
  53. #include <CubeMapCapture/EditorCubeMapCaptureComponent.h>
  54. #include <Debug/RayTracingDebugEditorComponent.h>
  55. #include <Debug/RenderDebugEditorComponent.h>
  56. #include <Decals/EditorDecalComponent.h>
  57. #include <Grid/EditorGridComponent.h>
  58. #include <ImageBasedLights/EditorImageBasedLightComponent.h>
  59. #include <Material/EditorMaterialComponent.h>
  60. #include <Material/EditorMaterialSystemComponent.h>
  61. #include <Mesh/EditorMeshComponent.h>
  62. #include <Mesh/EditorMeshSystemComponent.h>
  63. #include <ReflectionProbe/EditorReflectionProbeComponent.h>
  64. #include <SpecularReflections/EditorSpecularReflectionsComponent.h>
  65. #include <OcclusionCullingPlane/EditorOcclusionCullingPlaneComponent.h>
  66. #include <PostProcess/EditorPostFxLayerComponent.h>
  67. #include <PostProcess/Bloom/EditorBloomComponent.h>
  68. #include <PostProcess/ColorGrading/EditorHDRColorGradingComponent.h>
  69. #include <PostProcess/DepthOfField/EditorDepthOfFieldComponent.h>
  70. #include <PostProcess/DisplayMapper/EditorDisplayMapperComponent.h>
  71. #include <PostProcess/ExposureControl/EditorExposureControlComponent.h>
  72. #include <PostProcess/Ssao/EditorSsaoComponent.h>
  73. #include <PostProcess/LookModification/EditorLookModificationComponent.h>
  74. #include <PostProcess/RadiusWeightModifier/EditorRadiusWeightModifierComponent.h>
  75. #include <PostProcess/ShapeWeightModifier/EditorShapeWeightModifierComponent.h>
  76. #include <PostProcess/GradientWeightModifier/EditorGradientWeightModifierComponent.h>
  77. #include <PostProcess/ChromaticAberration/EditorChromaticAberrationComponent.h>
  78. #include <PostProcess/PaniniProjection/EditorPaniniProjectionComponent.h>
  79. #include <PostProcess/FilmGrain/EditorFilmGrainComponent.h>
  80. #include <PostProcess/WhiteBalance/EditorWhiteBalanceComponent.h>
  81. #include <PostProcess/Vignette/EditorVignetteComponent.h>
  82. #include <ScreenSpace/EditorDeferredFogComponent.h>
  83. #include <SkyAtmosphere/EditorSkyAtmosphereComponent.h>
  84. #include <SkyBox/EditorHDRiSkyboxComponent.h>
  85. #include <SkyBox/EditorPhysicalSkyComponent.h>
  86. #include <Scripting/EditorEntityReferenceComponent.h>
  87. #include <SurfaceData/EditorSurfaceDataMeshComponent.h>
  88. #include <Animation/EditorAttachmentComponent.h>
  89. #endif
  90. namespace AZ
  91. {
  92. namespace Render
  93. {
  94. class AtomLyIntegrationCommonFeaturesModule
  95. : public AZ::Module
  96. {
  97. public:
  98. AZ_RTTI(AtomLyIntegrationCommonFeaturesModule, "{E6FF4862-9355-4B23-AE00-B936F0C6E6C9}", AZ::Module);
  99. AZ_CLASS_ALLOCATOR(AtomLyIntegrationCommonFeaturesModule, AZ::SystemAllocator);
  100. AtomLyIntegrationCommonFeaturesModule()
  101. : AZ::Module()
  102. {
  103. m_descriptors.insert(m_descriptors.end(), {
  104. AtomLyIntegrationCommonFeaturesSystemComponent::CreateDescriptor(),
  105. AreaLightComponent::CreateDescriptor(),
  106. DecalComponent::CreateDescriptor(),
  107. DirectionalLightComponent::CreateDescriptor(),
  108. BloomComponent::CreateDescriptor(),
  109. HDRColorGradingComponent::CreateDescriptor(),
  110. DisplayMapperComponent::CreateDescriptor(),
  111. DepthOfFieldComponent::CreateDescriptor(),
  112. ExposureControlComponent::CreateDescriptor(),
  113. SsaoComponent::CreateDescriptor(),
  114. LookModificationComponent::CreateDescriptor(),
  115. GridComponent::CreateDescriptor(),
  116. HDRiSkyboxComponent::CreateDescriptor(),
  117. SkyAtmosphereComponent::CreateDescriptor(),
  118. ImageBasedLightComponent::CreateDescriptor(),
  119. MaterialComponent::CreateDescriptor(),
  120. MeshComponent::CreateDescriptor(),
  121. PhysicalSkyComponent::CreateDescriptor(),
  122. PostFxLayerComponent::CreateDescriptor(),
  123. ReflectionProbeComponent::CreateDescriptor(),
  124. SpecularReflectionsComponent::CreateDescriptor(),
  125. RayTracingDebugComponent::CreateDescriptor(),
  126. RenderDebugComponent::CreateDescriptor(),
  127. RadiusWeightModifierComponent::CreateDescriptor(),
  128. ShapeWeightModifierComponent::CreateDescriptor(),
  129. EntityReferenceComponent::CreateDescriptor(),
  130. GradientWeightModifierComponent::CreateDescriptor(),
  131. DeferredFogComponent::CreateDescriptor(),
  132. SurfaceData::SurfaceDataMeshComponent::CreateDescriptor(),
  133. AttachmentComponent::CreateDescriptor(),
  134. OcclusionCullingPlaneComponent::CreateDescriptor(),
  135. ChromaticAberrationComponent::CreateDescriptor(),
  136. PaniniProjectionComponent::CreateDescriptor(),
  137. FilmGrainComponent::CreateDescriptor(),
  138. WhiteBalanceComponent::CreateDescriptor(),
  139. VignetteComponent::CreateDescriptor(),
  140. CubeMapCaptureComponent::CreateDescriptor(),
  141. #ifdef ATOMLYINTEGRATION_FEATURE_COMMON_EDITOR
  142. EditorAreaLightComponent::CreateDescriptor(),
  143. EditorCommonFeaturesSystemComponent::CreateDescriptor(),
  144. EditorPostFxSystemComponent::CreateDescriptor(),
  145. EditorDecalComponent::CreateDescriptor(),
  146. EditorDirectionalLightComponent::CreateDescriptor(),
  147. EditorBloomComponent::CreateDescriptor(),
  148. EditorHDRColorGradingComponent::CreateDescriptor(),
  149. EditorDepthOfFieldComponent::CreateDescriptor(),
  150. EditorDisplayMapperComponent::CreateDescriptor(),
  151. EditorExposureControlComponent::CreateDescriptor(),
  152. EditorSsaoComponent::CreateDescriptor(),
  153. EditorLookModificationComponent::CreateDescriptor(),
  154. EditorGridComponent::CreateDescriptor(),
  155. EditorHDRiSkyboxComponent::CreateDescriptor(),
  156. EditorSkyAtmosphereComponent::CreateDescriptor(),
  157. EditorImageBasedLightComponent::CreateDescriptor(),
  158. EditorMaterialComponent::CreateDescriptor(),
  159. EditorMaterialSystemComponent::CreateDescriptor(),
  160. EditorMeshSystemComponent::CreateDescriptor(),
  161. EditorMeshComponent::CreateDescriptor(),
  162. EditorPhysicalSkyComponent::CreateDescriptor(),
  163. EditorPostFxLayerComponent::CreateDescriptor(),
  164. EditorReflectionProbeComponent::CreateDescriptor(),
  165. EditorSpecularReflectionsComponent::CreateDescriptor(),
  166. RayTracingDebugEditorComponent::CreateDescriptor(),
  167. RenderDebugEditorComponent::CreateDescriptor(),
  168. EditorRadiusWeightModifierComponent::CreateDescriptor(),
  169. EditorShapeWeightModifierComponent::CreateDescriptor(),
  170. EditorEntityReferenceComponent::CreateDescriptor(),
  171. EditorGradientWeightModifierComponent::CreateDescriptor(),
  172. EditorDeferredFogComponent::CreateDescriptor(),
  173. SurfaceData::EditorSurfaceDataMeshComponent::CreateDescriptor(),
  174. EditorAttachmentComponent::CreateDescriptor(),
  175. EditorOcclusionCullingPlaneComponent::CreateDescriptor(),
  176. EditorChromaticAberrationComponent::CreateDescriptor(),
  177. EditorPaniniProjectionComponent::CreateDescriptor(),
  178. EditorFilmGrainComponent::CreateDescriptor(),
  179. EditorWhiteBalanceComponent::CreateDescriptor(),
  180. EditorVignetteComponent::CreateDescriptor(),
  181. EditorCubeMapCaptureComponent::CreateDescriptor(),
  182. #endif
  183. });
  184. }
  185. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  186. {
  187. return AZ::ComponentTypeList{
  188. azrtti_typeid<AtomLyIntegrationCommonFeaturesSystemComponent>(),
  189. #ifdef ATOMLYINTEGRATION_FEATURE_COMMON_EDITOR
  190. azrtti_typeid<EditorMaterialSystemComponent>(),
  191. azrtti_typeid<EditorMeshSystemComponent>(),
  192. azrtti_typeid<EditorCommonFeaturesSystemComponent>(),
  193. azrtti_typeid<EditorPostFxSystemComponent>(),
  194. #endif
  195. };
  196. }
  197. };
  198. } // namespace Render
  199. } // namespace AZ
  200. #if defined(O3DE_GEM_NAME)
  201. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), AZ::Render::AtomLyIntegrationCommonFeaturesModule)
  202. #else
  203. AZ_DECLARE_MODULE_CLASS(Gem_CommonFeaturesAtom, AZ::Render::AtomLyIntegrationCommonFeaturesModule)
  204. #endif