LeviLamina
Loading...
Searching...
No Matches
RenderMaterial.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core_graphics/RenderMaterialBase.h"
7#include "mc/deps/core_graphics/enums/PrimitiveMode.h"
8#include "mc/deps/core_graphics/enums/TextureFormat.h"
9#include "mc/deps/core_graphics/interface/BlendStateDescription.h"
10#include "mc/deps/minecraft_renderer/framebuilder/bgfxbridge/DefineFlags.h"
11#include "mc/deps/minecraft_renderer/renderer/ActorMaterialVariation.h"
12#include "mc/deps/minecraft_renderer/renderer/MaterialRenderType.h"
13#include "mc/deps/minecraft_renderer/renderer/MaterialType.h"
14#include "mc/deps/renderer/VertexField.h"
15#include "mc/deps/renderer/VertexFormat.h"
16#include "mc/deps/renderer/hal/enums/MSAASupport.h"
17#include "mc/deps/renderer/hal/interface/DepthStencilStateDescription.h"
18#include "mc/deps/renderer/hal/interface/RasterizerStateDescription.h"
19#include "mc/deps/renderer/hal/interface/SamplerStateDescription.h"
20
21// auto generated forward declare list
22// clang-format off
23class HashedString;
25namespace Json { class Value; }
26// clang-format on
27
28namespace mce {
29
30class RenderMaterial : public ::cg::RenderMaterialBase {
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<2, 34, ::mce::VertexFormat> mVertexFormat;
35 ::ll::TypedStorage<4, 4, ::mce::MSAASupport> mMsaaSupport;
36 ::ll::TypedStorage<4, 4, float> mDepthBias;
37 ::ll::TypedStorage<4, 4, float> mSlopeScaledDepthBias;
38 ::ll::TypedStorage<1, 7, ::mce::BlendStateDescription> blendStateDescription;
39 ::ll::TypedStorage<4, 24, ::mce::DepthStencilStateDescription> depthStencilStateDescription;
40 ::ll::TypedStorage<4, 12, ::mce::RasterizerStateDescription> rasterizerStateDescription;
41 ::ll::TypedStorage<4, 96, ::std::array<::mce::SamplerStateDescription, 8>> samplerStateDescriptions;
42 ::ll::TypedStorage<8, 16, ::std::set<::mce::VertexField>> mVertexFields;
43 ::ll::TypedStorage<1, 1, ::mce::PrimitiveMode> mPrimitiveMode;
44 ::ll::TypedStorage<8, 24, ::std::vector<::mce::TextureFormat>> mDefaultRenderTargetFormats;
45 ::ll::TypedStorage<8, 24, ::std::vector<::std::vector<::mce::TextureFormat>>> mRenderTargetFormats;
46 ::ll::TypedStorage<4, 8, ::std::optional<::mce::framebuilder::bgfxbridge::DefineFlags>> mDefineFlags;
47 ::ll::TypedStorage<1, 2, ::std::optional<::mce::MaterialType>> mMaterialType;
48 ::ll::TypedStorage<8, 264, ::std::optional<::mce::ActorMaterialVariation>> mActorVariation;
49 ::ll::TypedStorage<1, 1, ::mce::MaterialRenderType> mRenderType;
50 // NOLINTEND
51
52public:
53 // prevent constructor by default
54 RenderMaterial& operator=(RenderMaterial const&);
55 RenderMaterial();
56
57public:
58 // virtual functions
59 // NOLINTBEGIN
60 virtual ::std::string buildHeader(::std::set<::std::string> const& defines) /*override*/;
61
62 virtual void parseRuntimeStates(::Json::Value const& root) /*override*/;
63
64 virtual void parseShader(::Json::Value const& root) /*override*/;
65
66 virtual void appendShaderPathForGfxAPI() /*override*/;
67 // NOLINTEND
68
69public:
70 // member functions
71 // NOLINTBEGIN
72 MCAPI explicit RenderMaterial(::std::vector<::mce::TextureFormat> const& defaultRenderTargetFormats);
73
74 MCAPI RenderMaterial(::mce::RenderMaterial const& parent);
75
76 MCAPI ::mce::ActorMaterialVariation getActorVariation(::mce::MaterialRenderType renderType);
77
78 MCAPI ::mce::framebuilder::bgfxbridge::DefineFlags const getDefinesFlags();
79
80 MCAPI ::std::optional<::mce::MaterialType> const getMaterialType();
81
82 MCFOLD ::mce::VertexFormat const& getVertexFormat() const;
83
84 MCAPI void parseBlendState(::Json::Value const& root);
85
86 MCAPI void parseDepthStencilState(::Json::Value const& root);
87
88 MCAPI void parseRasterizerState(::Json::Value const& root);
89
90 MCAPI void parseRenderTargetFormat(::Json::Value const& root);
91
92 MCAPI void parseSamplers(::Json::Value const& root);
93
94 MCAPI void parseVertexFields(::Json::Value const& root);
95
96 MCAPI bool
97 validateTextures(::ServerPBRTextureData const& textureData, ::HashedString const& renderControllerName) const;
98 // NOLINTEND
99
100public:
101 // constructor thunks
102 // NOLINTBEGIN
103 MCAPI void* $ctor(::std::vector<::mce::TextureFormat> const& defaultRenderTargetFormats);
104
105 MCAPI void* $ctor(::mce::RenderMaterial const& parent);
106 // NOLINTEND
107
108public:
109 // virtual function thunks
110 // NOLINTBEGIN
111 MCAPI ::std::string $buildHeader(::std::set<::std::string> const& defines);
112
113 MCAPI void $parseRuntimeStates(::Json::Value const& root);
114
115 MCAPI void $parseShader(::Json::Value const& root);
116
117 MCFOLD void $appendShaderPathForGfxAPI();
118 // NOLINTEND
119
120public:
121 // vftables
122 // NOLINTBEGIN
123 MCNAPI static void** $vftable();
124 // NOLINTEND
125};
126
127} // namespace mce
Definition HashedString.h:5
Definition Value.h:16
Definition RenderMaterial.h:7
static MCAPI void ** $vftable()
Definition ServerPBRTextureData.h:5