| 1 | #pragma once |
| 2 | |
| 3 | #include <container/seadOffsetList.h> |
| 4 | #include <container/seadPtrArray.h> |
| 5 | #include <container/seadStrTreeMap.h> |
| 6 | #include <gfx/seadCamera.h> |
| 7 | #include <gfx/seadFrameBuffer.h> |
| 8 | #include <nn/g3d/ViewVolume.h> |
| 9 | #include <utility/aglParameterIO.h> |
| 10 | |
| 11 | namespace agl { |
| 12 | class DrawContext; |
| 13 | |
| 14 | namespace pfx { |
| 15 | class FilterAA; |
| 16 | } |
| 17 | |
| 18 | namespace sdw { |
| 19 | class PrimitiveOcclusion; |
| 20 | } // namespace sdw |
| 21 | } // namespace agl |
| 22 | |
| 23 | namespace al { |
| 24 | class ApplicationMessageReceiver; |
| 25 | class AreaObjDirector; |
| 26 | class AtmosScatter; |
| 27 | class AtmosScatterDrawer; |
| 28 | class BloomDirector; |
| 29 | class CameraBlurController; |
| 30 | class CloudRenderKeeper; |
| 31 | class CubeMapDirector; |
| 32 | class DemoGraphicsController; |
| 33 | class DepthOfFieldDrawer; |
| 34 | class DirectionalLightKeeper; |
| 35 | class EffectSystem; |
| 36 | class ExecuteDirector; |
| 37 | class FlareFilterDirector; |
| 38 | class ; |
| 39 | class FogDirector; |
| 40 | class FullScreenTriangle; |
| 41 | class GBufferArray; |
| 42 | class GodRayDirector; |
| 43 | class GpuMemAllocator; |
| 44 | class GraphicsAreaDirector; |
| 45 | class GraphicsCalcGpuInfo; |
| 46 | class GraphicsComputeInfo; |
| 47 | class GraphicsCopyInfo; |
| 48 | class GraphicsQualityController; |
| 49 | class GraphicsParamFilePath; |
| 50 | class GraphicsParamRequesterImpl; |
| 51 | class GraphicsParamRequesterImpl; |
| 52 | class GraphicsPresetDirector; |
| 53 | class GraphicsRenderInfo; |
| 54 | class GraphicsUpdateInfo; |
| 55 | class HdrCompose; |
| 56 | class LightStreakDirector; |
| 57 | class MaterialCategoryKeeper; |
| 58 | class MaterialLightDirector; |
| 59 | class ModelLodAllCtrl; |
| 60 | class ModelOcclusionCullingDirector; |
| 61 | class ModelShaderHolder; |
| 62 | class NoiseTextureKeeper; |
| 63 | class OccludedEffectDirector; |
| 64 | class OcclusionCullingJudge; |
| 65 | class OceanWave; |
| 66 | class PartsGraphics; |
| 67 | class PlayerHolder; |
| 68 | class PeripheryRendering; |
| 69 | class PointSpriteCursorHolder; |
| 70 | class PostProcessingFilter; |
| 71 | class PrePassLightKeeper; |
| 72 | class PrepassTriangleCulling; |
| 73 | class ProgramTextureKeeper; |
| 74 | class Projection; |
| 75 | class RadialBlurDirector; |
| 76 | class RandomTextureKeeper; |
| 77 | class ReducedBufferRenderer; |
| 78 | class RenderVariables; |
| 79 | class RippleTextureKeeper; |
| 80 | class Resource; |
| 81 | class SceneCameraInfo; |
| 82 | class ShaderCubeMapKeeper; |
| 83 | class ShaderEnvTextureKeeper; |
| 84 | class ShadowDirector; |
| 85 | class ShaderHolder; |
| 86 | class ShaderMirrorDirector; |
| 87 | class SimpleModelEnv; |
| 88 | class SkyDirector; |
| 89 | class SSIIKeeper; |
| 90 | class StarrySky; |
| 91 | class SubCameraRenderer; |
| 92 | class TemporalInterlace; |
| 93 | class ThunderRenderKeeper; |
| 94 | class UniformBlock; |
| 95 | class VastGridMeshDirector; |
| 96 | class ViewRenderer; |
| 97 | class VignettingDrawer; |
| 98 | class WorldAODirector; |
| 99 | |
| 100 | struct GraphicsInitArg { |
| 101 | GraphicsInitArg(agl::DrawContext*, sead::FrameBuffer*); |
| 102 | bool isUsingCubeMapAtmosScatter() const; |
| 103 | u32 getAtmosScatterViewNum() const; |
| 104 | |
| 105 | s32 _0; |
| 106 | bool _4; |
| 107 | u8 atmosScatterViewNum; |
| 108 | bool _6; |
| 109 | s32 displayWidth; |
| 110 | s32 displayHeight; |
| 111 | s32 _10; |
| 112 | s32 _14; |
| 113 | s32 _18; |
| 114 | s32 _1c; |
| 115 | bool _20; |
| 116 | s32 _24; |
| 117 | bool _28; |
| 118 | s32 _2c; |
| 119 | s32 _30; |
| 120 | s32 _34; |
| 121 | s32 _38; |
| 122 | s32 _3c; |
| 123 | agl::DrawContext* drawContext; |
| 124 | }; |
| 125 | |
| 126 | class GraphicsSystemInfo { |
| 127 | public: |
| 128 | GraphicsSystemInfo(); |
| 129 | ~GraphicsSystemInfo(); |
| 130 | |
| 131 | SimpleModelEnv* getModelEnv() const; |
| 132 | agl::DrawContext* getDrawContext() const; |
| 133 | ShaderCubeMapKeeper* getShaderCubeMapKeeper() const; |
| 134 | const sead::PtrArray<UniformBlock>* getViewIndexedUboArray(const char*) const; |
| 135 | void setViewIndexedUboArray(const char*, const sead::PtrArray<UniformBlock>*); |
| 136 | void initAtmosScatter(ExecuteDirector*); |
| 137 | void init(const GraphicsInitArg&, AreaObjDirector*, ExecuteDirector*, EffectSystem*, |
| 138 | PlayerHolder*, SceneCameraInfo*, ShaderHolder*); |
| 139 | void initProjectResource(); |
| 140 | void initStageResource(const Resource*, const char*, const char*); |
| 141 | void endInit(); |
| 142 | void initAfterPlacement(); |
| 143 | void initAfterCreateDrawTable(); |
| 144 | void setDrawEnv(s32, GBufferArray*, const sead::Camera*, const Projection*); |
| 145 | void clearGraphicsRequest(); |
| 146 | void cancelLerp(); |
| 147 | void updateGraphics(); |
| 148 | void updatePartsGraphics(const GraphicsUpdateInfo&); |
| 149 | void preDrawGraphics(SceneCameraInfo*); |
| 150 | void calcGpuPartsGraphics(const GraphicsCalcGpuInfo&); |
| 151 | void updateViewGpu(s32, const sead::Camera*, const Projection*); |
| 152 | void updateViewVolume(const sead::Matrix34f&, const sead::Matrix44f&); |
| 153 | void clearViewVolume(); |
| 154 | bool tryGetAtmosLightDir(sead::Vector3f*) const; |
| 155 | bool tryDirectionalLightInfo(sead::Vector3f*) const; |
| 156 | void activateDirLitColorTex() const; |
| 157 | void activateDirLitColorTex(agl::DrawContext*) const; |
| 158 | bool registPartsGraphics(PartsGraphics*); |
| 159 | void drawSystemPartsGraphics(const GraphicsRenderInfo*) const; |
| 160 | void doPartsGraphicsCommandBufferCopy(const GraphicsCopyInfo&) const; |
| 161 | void doPartsGraphicsCompute(const GraphicsComputeInfo&) const; |
| 162 | void drawPartsGraphics(const GraphicsRenderInfo&, const RenderVariables&) const; |
| 163 | void drawPartsGraphicsGBufferAfterSky(const GraphicsRenderInfo&) const; |
| 164 | void drawPartsGraphicsDeferred(const GraphicsRenderInfo&) const; |
| 165 | void drawPartsGraphicsLdr(const GraphicsRenderInfo&) const; |
| 166 | void drawPartsGraphicsIndirect(const GraphicsRenderInfo&, const RenderVariables&) const; |
| 167 | void drawPartsGraphicsCubemap(const GraphicsRenderInfo&) const; |
| 168 | |
| 169 | void set_2f4(s32 set) { _2f4 = set; } |
| 170 | |
| 171 | ViewRenderer* getViewRenderer() const { return mViewRenderer; } |
| 172 | |
| 173 | ModelLodAllCtrl* getModelLodAllCtrl() const { return mModelLodAllCtrl; } |
| 174 | |
| 175 | MaterialCategoryKeeper* getMaterialCategoryKeeper() const { return mMaterialCategoryKeeper; } |
| 176 | |
| 177 | GraphicsQualityController* getGraphicsQualityController() const { |
| 178 | return mGraphicsQualityController; |
| 179 | } |
| 180 | |
| 181 | ModelOcclusionCullingDirector* getModelOcclusionCullingDirector() { |
| 182 | return mModelOcclusionCullingDirector; |
| 183 | } |
| 184 | |
| 185 | void setApplicationMessageReceiver(ApplicationMessageReceiver* applicationMessageReceiver) { |
| 186 | mApplicationMessageReceiver = applicationMessageReceiver; |
| 187 | } |
| 188 | |
| 189 | SkyDirector* getSkyDirector() const { return mSkyDirector; } |
| 190 | |
| 191 | OcclusionCullingJudge* getOcclusionCullingJudge() const { return mOcclusionCullingJudge; } |
| 192 | |
| 193 | PostProcessingFilter* getPostProcessingFilter() const { return mPostProcessingFilter; } |
| 194 | |
| 195 | private: |
| 196 | sead::StrTreeMap<128, const sead::PtrArray<UniformBlock>*> mViewIndexedUboArrayTree; |
| 197 | GraphicsInitArg mInitArg; |
| 198 | BloomDirector* mBloomDirector; |
| 199 | CubeMapDirector* mCubeMapDirector; |
| 200 | DirectionalLightKeeper* mDirectionalLightKeeper; |
| 201 | GraphicsAreaDirector* mGraphicsAreaDirector; |
| 202 | GraphicsPresetDirector* mGraphicsPresetDirector; |
| 203 | DemoGraphicsController* mDemoGraphicsController; |
| 204 | RadialBlurDirector* mRadialBlurDirector; |
| 205 | PrePassLightKeeper* mPrePassLightKeeper; |
| 206 | ShaderEnvTextureKeeper* mShaderEnvTextureKeeper; |
| 207 | ShadowDirector* mShadowDirector; |
| 208 | DepthOfFieldDrawer* mDepthOfFieldDrawer; |
| 209 | GraphicsQualityController* mGraphicsQualityController; |
| 210 | ShaderMirrorDirector* mShaderMirrorDirector; |
| 211 | GraphicsParamRequesterImpl* _d0; |
| 212 | GraphicsParamRequesterImpl* mColorCorrection; |
| 213 | FlareFilterDirector* mFlareFilterDirector; |
| 214 | GodRayDirector* mGodRayDirector; |
| 215 | FogDirector* mFogDirector; |
| 216 | OccludedEffectDirector* mOccludedEffectDirector; |
| 217 | LightStreakDirector* mLightStreakDirector; |
| 218 | HdrCompose* mHdrCompose; |
| 219 | SSIIKeeper* mSSIIKeeper; |
| 220 | agl::sdw::PrimitiveOcclusion* mPrimitiveOcclusion; |
| 221 | nn::g3d::ViewVolume mViewVolume; |
| 222 | void* _208; |
| 223 | OceanWave* mOceanWave; |
| 224 | RandomTextureKeeper* mRandomTextureKeeper; |
| 225 | WorldAODirector* mWorldAODirector; |
| 226 | PointSpriteCursorHolder* mPointSpriteCursorHolder; |
| 227 | MaterialLightDirector* mMaterialLightDirector; |
| 228 | MaterialCategoryKeeper* mMaterialCategoryKeeper; |
| 229 | SkyDirector* mSkyDirector; |
| 230 | ShaderHolder* mShaderHolder; |
| 231 | OcclusionCullingJudge* mOcclusionCullingJudge; |
| 232 | VignettingDrawer* mVignettingDrawer; |
| 233 | CameraBlurController* mCameraBlurController; |
| 234 | ThunderRenderKeeper* mThunderRenderKeeper; |
| 235 | StarrySky* mStarrySky; |
| 236 | NoiseTextureKeeper* mNoiseTextureKeeper; |
| 237 | CloudRenderKeeper* mCloudRenderKeeper; |
| 238 | GpuMemAllocator* mGpuMemAllocator; |
| 239 | FootPrintTextureKeeper* ; |
| 240 | ProgramTextureKeeper* mProgramTextureKeeper; |
| 241 | RippleTextureKeeper* mRippleTextureKeeper; |
| 242 | sead::PtrArrayImpl* _2a8; |
| 243 | ViewRenderer* mViewRenderer; |
| 244 | SubCameraRenderer* mSubCameraRenderer; |
| 245 | TemporalInterlace* mTemporalInterface; |
| 246 | PeripheryRendering* mPeripheryRendering; |
| 247 | PostProcessingFilter* mPostProcessingFilter; |
| 248 | GBufferArray* mDrawEnvGBufferArray; |
| 249 | const sead::Camera* mDrawEnvCamera; |
| 250 | const Projection* mDrawEnvProjection; |
| 251 | s32 mDrawEnvViewIndex; |
| 252 | s32 _2f4; |
| 253 | agl::pfx::FilterAA* mFilterAA; |
| 254 | AtmosScatter* mAtmosScatter; |
| 255 | AtmosScatterDrawer* mAtmosScatterDrawer; |
| 256 | GraphicsParamFilePath* mParamFilePath; |
| 257 | // agl::utl::IParameterIO _318; |
| 258 | // agl::utl::IParameterObj _4e8; |
| 259 | // agl::utl::ParameterOfInt mAreaFindMode; |
| 260 | // agl::utl::ParameterOfInt mAtmosScatterType; |
| 261 | // agl::utl::ParameterOfBool mIsUsingUpdateAtmosCubeMap; |
| 262 | // agl::utl::ParameterOfBool mIsUsingOceanWave; |
| 263 | // agl::utl::ParameterOfInt mOccGroupNum; |
| 264 | // agl::utl::IParameterIO _5b8; |
| 265 | // agl::utl::IParameterObj _788; |
| 266 | // agl::utl::ParameterOfBool mIsUsingTemporal; |
| 267 | // agl::utl::ParameterOfBool mIsUsingPeriphery; |
| 268 | // agl::utl::ParameterOfBool mIsUsingStarrySky; |
| 269 | // agl::utl::ParameterOfFloat mCupeMapIntensityPower; |
| 270 | // agl::utl::ParameterOfFloat mCubeMapIntensityRange; |
| 271 | // agl::utl::ParameterOfFloat mLineLightAntiArtifact; |
| 272 | // agl::utl::ParameterOfFloat mMinRoughnessGGX; |
| 273 | // agl::utl::ParameterOfFloat mSphereLightDiffuseAdd; |
| 274 | // agl::utl::ParameterOfFloat mSpecularScale; |
| 275 | // agl::utl::ParameterOfFloat mLightUnitScale; |
| 276 | // agl::utl::ParameterOfFloat mLightColorScale; |
| 277 | char filler[0x918 - 0x318]; // TODO: Replace this with the real params once the Parameter types |
| 278 | // are added to agl |
| 279 | UniformBlock* _918; |
| 280 | Resource* _920; |
| 281 | AreaObjDirector* mAreaObjDirector; |
| 282 | ExecuteDirector* mExecuteDirector; |
| 283 | EffectSystem* mEffectSystem; |
| 284 | SceneCameraInfo* mSceneCameraInfo; |
| 285 | const char* _948; |
| 286 | void* _950[3]; // sead::OffsetList |
| 287 | VastGridMeshDirector* mVastGridMeshDirector; |
| 288 | FullScreenTriangle* mFullScreenTriangle; |
| 289 | s32 _978; |
| 290 | ReducedBufferRenderer* mReducedBufferRenderer; |
| 291 | ModelOcclusionCullingDirector* mModelOcclusionCullingDirector; |
| 292 | ModelLodAllCtrl* mModelLodAllCtrl; |
| 293 | ModelShaderHolder* mModelShaderHolder; |
| 294 | PrepassTriangleCulling* mPrepassTriangleCulling; |
| 295 | bool _9a8; |
| 296 | ApplicationMessageReceiver* mApplicationMessageReceiver; |
| 297 | void* _9b8; |
| 298 | }; |
| 299 | |
| 300 | static_assert(sizeof(GraphicsSystemInfo) == 0x9c0); |
| 301 | |
| 302 | } // namespace al |
| 303 | |