CommonLibSSE NG
Loading...
Searching...
No Matches
BSShaderProperty.h
Go to the documentation of this file.
1#pragma once
2
7
8namespace RE
9{
10 class BSRenderPass;
11 class BSShaderAccumulator;
12 class BSShaderMaterial;
13 class BSShaderPropertyLightData;
14 class NiSourceTexture;
15
17 {
18 private:
19 static constexpr auto BIT64 = static_cast<std::uint64_t>(1);
20
21 public:
22 inline static constexpr auto RTTI = RTTI_BSShaderProperty;
23 inline static auto Ni_RTTI = NiRTTI_BSShaderProperty;
24
26 {
27 public:
28 inline static constexpr auto RTTI = RTTI_BSShaderProperty__ForEachVisitor;
29
30 virtual ~ForEachVisitor(); // 00
31
32 // add
33 virtual std::uint32_t Accept(NiSourceTexture* a_texture) = 0; // 01
34 };
35
37 {
39 };
40 static_assert(sizeof(RenderPassArray) == 0x8);
41
42 enum class EShaderPropertyFlag : std::uint64_t
43 {
44 kSpecular = BIT64 << 0,
45 kSkinned = BIT64 << 1,
46 kTempRefraction = BIT64 << 2,
47 kVertexAlpha = BIT64 << 3,
48 kGrayscaleToPaletteColor = BIT64 << 4,
49 kGrayscaleToPaletteAlpha = BIT64 << 5,
50 kFalloff = BIT64 << 6,
51 kEnvMap = BIT64 << 7,
52 kReceiveShadows = BIT64 << 8,
53 kCastShadows = BIT64 << 9,
54 kFace = BIT64 << 10,
55 kParallax = BIT64 << 11,
56 kModelSpaceNormals = BIT64 << 12,
57 kNonProjectiveShadows = BIT64 << 13,
58 kMultiTextureLandscape = BIT64 << 14,
59 kRefraction = BIT64 << 15,
60 kRefractionFalloff = BIT64 << 16,
61 kEyeReflect = BIT64 << 17,
62 kHairTint = BIT64 << 18,
63 kScreendoorAlphaFade = BIT64 << 19,
64 kLocalMapClear = BIT64 << 20,
65 kFaceGenRGBTint = BIT64 << 21,
66 kOwnEmit = BIT64 << 22,
67 kProjectedUV = BIT64 << 23,
68 kMultipleTextures = BIT64 << 24,
69 kRemappableTextures = BIT64 << 25,
70 kDecal = BIT64 << 26,
71 kDynamicDecal = BIT64 << 27,
72 kParallaxOcclusion = BIT64 << 28,
73 kExternalEmittance = BIT64 << 29,
74 kSoftEffect = BIT64 << 30,
75 kZBufferTest = BIT64 << 31,
76 kZBufferWrite = BIT64 << 32,
77 kLODLandscape = BIT64 << 33,
78 kLODObjects = BIT64 << 34,
79 kNoFade = BIT64 << 35,
80 kTwoSided = BIT64 << 36,
81 kVertexColors = BIT64 << 37,
82 kGlowMap = BIT64 << 38,
83 kAssumeShadowmask = BIT64 << 39,
84 kCharacterLighting = BIT64 << 40,
85 kMultiIndexSnow = BIT64 << 41,
86 kVertexLighting = BIT64 << 42,
87 kUniformScale = BIT64 << 43,
88 kFitSlope = BIT64 << 44,
89 kBillboard = BIT64 << 45,
90 kNoLODLandBlend = BIT64 << 46,
91 kEnvmapLightFade = BIT64 << 47,
92 kWireframe = BIT64 << 48,
93 kWeaponBlood = BIT64 << 49,
94 kHideOnLocalMap = BIT64 << 50,
95 kPremultAlpha = BIT64 << 51,
96 kCloudLOD = BIT64 << 52,
97 kAnisotropicLighting = BIT64 << 53,
98 kNoTransparencyMultiSample = BIT64 << 54,
99 kMenuScreen = BIT64 << 55,
100 kMultiLayerParallax = BIT64 << 56,
101 kSoftLighting = BIT64 << 57,
102 kRimLighting = BIT64 << 58,
103 kBackLighting = BIT64 << 59,
104 kSnow = BIT64 << 60,
105 kTreeAnim = BIT64 << 61,
106 kEffectLighting = BIT64 << 62,
107 kHDLODObjects = BIT64 << 63
108 };
109
110 enum class EShaderPropertyFlag8 : std::uint8_t
111 {
112 kSpecular = 0,
113 kSkinned = 1,
114 kTempRefraction = 2,
115 kVertexAlpha = 3,
118 kFalloff = 6,
119 kEnvMap = 7,
120 kReceiveShadows = 8,
121 kCastShadows = 9,
122 kFace = 10,
123 kParallax = 11,
127 kRefraction = 15,
129 kEyeReflect = 17,
130 kHairTint = 18,
132 kLocalMapClear = 20,
133 kFaceGenRGBTint = 21,
134 kOwnEmit = 22,
135 kProjectedUV = 23,
138 kDecal = 26,
139 kDynamicDecal = 27,
142 kSoftEffect = 30,
143 kZBufferTest = 31,
144 kZBufferWrite = 32,
145 kLODLandscape = 33,
146 kLODObjects = 34,
147 kNoFade = 35,
148 kTwoSided = 36,
149 kVertexColors = 37,
150 kGlowMap = 38,
153 kMultiIndexSnow = 41,
154 kVertexLighting = 42,
155 kUniformScale = 43,
156 kFitSlope = 44,
157 kBillboard = 45,
158 kNoLODLandBlend = 46,
159 kEnvmapLightFade = 47,
160 kWireframe = 48,
161 kWeaponBlood = 49,
162 kHideOnLocalMap = 50,
163 kPremultAlpha = 51,
164 kCloudLOD = 52,
167 kMenuScreen = 55,
169 kSoftLighting = 57,
170 kRimLighting = 58,
171 kBackLighting = 59,
172 kSnow = 60,
173 kTreeAnim = 61,
174 kEffectLighting = 62,
175 kHDLODObjects = 63
176 };
177
178 ~BSShaderProperty() override; // 00
179
180 // override (NiShadeProperty)
181 const NiRTTI* GetRTTI() const override; // 02
182 NiObject* CreateClone(NiCloningProcess& a_cloning) override; // 17 - { return 0; }
183 void LoadBinary(NiStream& a_stream) override; // 18
184 void LinkObject(NiStream& a_stream) override; // 19 - { NiShadeProperty::LinkObject(a_stream); }
185 bool RegisterStreamables(NiStream& a_stream) override; // 1A - { return NiShadeProperty::RegisterStreamables(a_stream); }
186 void SaveBinary(NiStream& a_stream) override; // 1B
187 bool IsEqual(NiObject* a_object) override; // 1C - { return false; }
188 void PostLinkObject(NiStream& a_stream) override; // 1E - { NiObjectNET::PostLinkObject(a_stream); }
189 bool SetupGeometry(BSGeometry* a_geometry) override; // 27 - { return 1; }
190 void Unk_29(void) override; // 29
191
192 // add
193 virtual RenderPassArray* GetRenderPasses(BSGeometry* a_geometry, std::uint32_t a_arg2, BSShaderAccumulator* a_accumulator) = 0; // 2A
194 virtual void Unk_2B(void); // 2B - { return 0; }
195 virtual void Unk_2C(void); // 2C - { return 0; }
196 virtual void Unk_2D(void); // 2D - { return 0; }
197 virtual void Unk_2E(void); // 2E - { return 1; }
198 virtual void Unk_2F(void); // 2F - { return 0; }
199 virtual bool CanMerge(const BSShaderProperty* a_other); // 30
200 virtual void SetMaterialAlpha(float a_alpha); // 31 - { return; }
201 [[nodiscard]] virtual float QMaterialAlpha(); // 32 - { return 1.0; }
202 virtual std::int32_t ForEachTexture(ForEachVisitor& a_visitor); // 33 - { return 1; }
203 virtual void DoClearRenderPasses(); // 34
204 virtual std::int32_t QShader(); // 35 - { return 0; }
205 virtual void Unk_36(void); // 36 - { return 0; }
206 [[nodiscard]] virtual NiSourceTexture* GetBaseTexture(); // 37 - { return 0; }
207 virtual void Unk_38(void); // 38 - { return 0; }
208 [[nodiscard]] virtual bool AcceptsEffectData() const; // 39 - { return false; }
209 virtual void Unk_3A(void); // 3A - { return; }
210 virtual void Unk_3B(void); // 3B - { return; }
211 virtual void Unk_3C(void); // 3C - { return 0; }
212 virtual std::uint32_t DetermineUtilityShaderDecl(); // 3D - { return 0; }
213 virtual BSShaderMaterial::Type GetMaterialType(); // 3E - { return 0; }
214
216 void SetMaterial(BSShaderMaterial* a_material, bool a_unk1);
217 void SetFlags(EShaderPropertyFlag8 a_flag, bool a_set);
218
219 // members
220 float alpha; // 30
221 std::int32_t lastRenderPassState; // 34
224 std::uint64_t unk48; // 48
226 std::uint64_t unk58; // 58
231 std::uint64_t unk80; // 80
232 };
233 static_assert(sizeof(BSShaderProperty) == 0x88);
234}
Definition BSFadeNode.h:11
Definition BSGeometry.h:15
Definition BSRenderPass.h:11
Definition BSShaderMaterial.h:9
Type
Definition BSShaderMaterial.h:38
Definition BSShaderProperty.h:26
virtual std::uint32_t Accept(NiSourceTexture *a_texture)=0
static constexpr auto RTTI
Definition BSShaderProperty.h:28
Definition BSShaderProperty.h:17
virtual std::int32_t ForEachTexture(ForEachVisitor &a_visitor)
void LoadBinary(NiStream &a_stream) override
BSTSmartPointer< BSEffectShaderData > effectData
Definition BSShaderProperty.h:228
RenderPassArray debugRenderPassList
Definition BSShaderProperty.h:225
float alpha
Definition BSShaderProperty.h:220
std::int32_t lastRenderPassState
Definition BSShaderProperty.h:221
virtual std::uint32_t DetermineUtilityShaderDecl()
BSShaderPropertyLightData * lightData
Definition BSShaderProperty.h:229
virtual void Unk_38(void)
bool SetupGeometry(BSGeometry *a_geometry) override
virtual void SetMaterialAlpha(float a_alpha)
void LinkObject(NiStream &a_stream) override
std::uint64_t unk48
Definition BSShaderProperty.h:224
void SetFlags(EShaderPropertyFlag8 a_flag, bool a_set)
virtual void Unk_2F(void)
virtual void Unk_3B(void)
EShaderPropertyFlag
Definition BSShaderProperty.h:43
virtual float QMaterialAlpha()
virtual bool CanMerge(const BSShaderProperty *a_other)
virtual void Unk_3A(void)
BSFadeNode * fadeNode
Definition BSShaderProperty.h:227
virtual NiSourceTexture * GetBaseTexture()
static constexpr auto RTTI
Definition BSShaderProperty.h:22
stl::enumeration< EShaderPropertyFlag, std::uint64_t > flags
Definition BSShaderProperty.h:222
~BSShaderProperty() override
void PostLinkObject(NiStream &a_stream) override
static auto Ni_RTTI
Definition BSShaderProperty.h:23
virtual void Unk_2C(void)
BSShaderMaterial * material
Definition BSShaderProperty.h:230
virtual void Unk_3C(void)
RenderPassArray renderPassList
Definition BSShaderProperty.h:223
virtual BSShaderMaterial::Type GetMaterialType()
std::uint64_t unk80
Definition BSShaderProperty.h:231
const NiRTTI * GetRTTI() const override
void Unk_29(void) override
void SetEffectShaderData(const BSTSmartPointer< BSEffectShaderData > &a_data)
bool IsEqual(NiObject *a_object) override
virtual void Unk_2B(void)
void SetMaterial(BSShaderMaterial *a_material, bool a_unk1)
void SaveBinary(NiStream &a_stream) override
virtual bool AcceptsEffectData() const
NiObject * CreateClone(NiCloningProcess &a_cloning) override
virtual void Unk_2E(void)
EShaderPropertyFlag8
Definition BSShaderProperty.h:111
std::uint64_t unk58
Definition BSShaderProperty.h:226
virtual std::int32_t QShader()
virtual void Unk_2D(void)
bool RegisterStreamables(NiStream &a_stream) override
virtual RenderPassArray * GetRenderPasses(BSGeometry *a_geometry, std::uint32_t a_arg2, BSShaderAccumulator *a_accumulator)=0
virtual void DoClearRenderPasses()
virtual void Unk_36(void)
Definition BSShaderPropertyLightData.h:10
Definition BSTSmartPointer.h:36
Definition NiCloningProcess.h:10
Definition NiObject.h:37
Definition NiRTTI.h:6
Definition NiShadeProperty.h:8
Definition NiSourceTexture.h:21
Definition NiStream.h:27
Definition PCH.h:223
Definition AbsorbEffect.h:6
constexpr REL::VariantID NiRTTI_BSShaderProperty(527634, 414563, 0x3422f68)
constexpr REL::VariantID RTTI_BSShaderProperty(691873, 399917, 0x1f7d760)
constexpr REL::VariantID RTTI_BSShaderProperty__ForEachVisitor(684927, 392664, 0x1edc5f0)
Definition BSShaderProperty.h:37
BSRenderPass * head
Definition BSShaderProperty.h:38