CommonLibSSE NG
TESEffectShader.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/C/Color.h"
4 #include "RE/F/FormTypes.h"
5 #include "RE/T/TESForm.h"
6 #include "RE/T/TESTexture.h"
7 
8 namespace RE
9 {
10  enum class D3DBLEND;
11  enum class D3DBLENDOP;
12 
13  enum class D3DCMPFUNC
14  {
15  kNever = 1,
16  kLess,
17  kEqual,
18  kLessEqual,
19  kGreater,
20  kNotEqual,
22  kAlways
23  };
24 
25  struct EffectShaderData // DATA
26  {
27  public:
28  enum class Flags
29  {
30  kNone = 0,
31  kDisableTextureShader = 1 << 0,
32  kGreyscaleToColor = 1 << 1,
33  kGreyscaleToAlpha = 1 << 2,
34  kDisableParticleShader = 1 << 3,
35  kEdgeColorSubtractive = 1 << 4,
36  kSkinOnly = 1 << 5,
37  kIgnoreTexAlpha = 1 << 6,
38  kFillTexProjectedUV = 1 << 7,
39  kIgnoreBaseGeomTexAlpha = 1 << 8,
40  kLighting = 1 << 9,
41  kIgnoreWeapons = 1 << 10,
42  kAlpha = 1 << 11,
43  kPreferDismemberedLimb = 1 << 12,
44  kParticleAnimated = 1 << 15,
45  kParticleGreyscaleColor = 1 << 16,
46  kParticleGreyscaleAlpha = 1 << 17,
47  kUseBloodGeometry = 1 << 24
48  };
49 
50  // members
51  std::uint32_t unk00; // 000
52 
54  D3DBLENDOP membraneShaderBlendOperation; // 008
56 
66 
67  float edgeEffectFallOff; // 034
75 
77 
79 
80  D3DBLEND membraneShaderDestBlendMode; // 05C
81 
83  D3DBLENDOP particleShaderBlendOperation; // 064
85  D3DBLEND particleShaderDestBlendMode; // 06C
105 
106  Color colorKey1; // 0BC
107  Color colorKey2; // 0C0
108  Color colorKey3; // 0C4
109  float colorKey1ColorAlpha; // 0C8
110  float colorKey2ColorAlpha; // 0CC
111  float colorKey3ColorAlpha; // 0D0
112  float colorKey1ColorKeyTime; // 0D4
113  float colorKey2ColorKeyTime; // 0D8
114  float colorKey3ColorKeyTime; // 0DC
115 
121 
122  std::uint32_t pad0D4; // 0F4
123 
125 
126  float holesStartTime; // 100
127  float holesEndTime; // 104
128  float holesStartVal; // 108
129  float holesEndVal; // 10C
130 
131  float edgeWidthAlphaUnits; // 110
132  Color edgeColor; // 114
133 
134  float explosionWindSpeed; // 118
135 
136  float textureCountU; // 11C
137  float textureCountV; // 120
138 
139  float addonModelsFadeInTime; // 124
141  float addonModelsScaleStart; // 12C
142  float addonModelsScaleEnd; // 130
145 
146  std::uint32_t pad13C; // 13C
147 
149 
158 
159  float colorScale; // 168
160 
161  float birthPositionOffset; // 16C
163 
171 
173 
176 
177  std::uint32_t sceneGraphEmitDepthLimit; // 19C - unused
178  };
179  static_assert(sizeof(EffectShaderData) == 0x1A0);
180 
181  class TESEffectShader : public TESForm
182  {
183  public:
184  inline static constexpr auto RTTI = RTTI_TESEffectShader;
185  inline static constexpr auto VTABLE = VTABLE_TESEffectShader;
186  inline static constexpr auto FORMTYPE = FormType::EffectShader;
187 
188  struct RecordFlags
189  {
190  enum RecordFlag : std::uint32_t
191  {
192  kDeleted = 1 << 5,
193  kIgnored = 1 << 12
194  };
195  };
196 
197  ~TESEffectShader() override; // 00
198 
199  // override (TESForm)
200  void InitializeData() override; // 04
201  bool Load(TESFile* a_mod) override; // 06
202  void InitItemImpl() override; // 13
203 
204  // members
205  EffectShaderData data; // 020 - DATA
206  TESTexture fillTexture; // 1C0 - ICON
208  TESTexture holesTexture; // 1E0 - NAM7
211  void* unk210; // 210 - smart ptr
212  void* unk218; // 218 - smart ptr
213  };
214  static_assert(sizeof(TESEffectShader) == 0x220);
215 }
Definition: BGSDebris.h:40
Definition: BGSSoundDescriptorForm.h:14
Definition: TESEffectShader.h:182
static constexpr auto RTTI
Definition: TESEffectShader.h:184
TESTexture particlePaletteTexture
Definition: TESEffectShader.h:210
void * unk218
Definition: TESEffectShader.h:212
void InitItemImpl() override
~TESEffectShader() override
void InitializeData() override
static constexpr auto FORMTYPE
Definition: TESEffectShader.h:186
bool Load(TESFile *a_mod) override
TESTexture holesTexture
Definition: TESEffectShader.h:208
EffectShaderData data
Definition: TESEffectShader.h:205
static constexpr auto VTABLE
Definition: TESEffectShader.h:185
void * unk210
Definition: TESEffectShader.h:211
TESTexture fillTexture
Definition: TESEffectShader.h:206
TESTexture particleShaderTexture
Definition: TESEffectShader.h:207
TESTexture membranePaletteTexture
Definition: TESEffectShader.h:209
Definition: TESFile.h:17
Definition: TESForm.h:36
Definition: TESTexture.h:10
Definition: AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 1 > VTABLE_TESEffectShader
Definition: Offsets_VTABLE.h:492
D3DCMPFUNC
Definition: TESEffectShader.h:14
constexpr REL::VariantID RTTI_TESEffectShader(513866, 392237, 0x1ed7090)
Definition: Color.h:8
Definition: TESEffectShader.h:26
float holesStartTime
Definition: TESEffectShader.h:126
float addonModelsScaleInTime
Definition: TESEffectShader.h:143
float addonModelsFadeInTime
Definition: TESEffectShader.h:139
float particleShaderPersistantParticleCount
Definition: TESEffectShader.h:90
float colorKey3ColorKeyTime
Definition: TESEffectShader.h:114
float explosionWindSpeed
Definition: TESEffectShader.h:134
float particleShaderInitialVelocity2
Definition: TESEffectShader.h:96
float particleShaderAccelerationAlongNormal
Definition: TESEffectShader.h:94
Color edgeColor
Definition: TESEffectShader.h:132
float particleShaderAnimatedLoopStartFrame
Definition: TESEffectShader.h:167
float holesStartVal
Definition: TESEffectShader.h:128
float holesEndTime
Definition: TESEffectShader.h:127
Color fillTextureEffectColorKey1
Definition: TESEffectShader.h:57
Color fillTextureEffectColorKey3
Definition: TESEffectShader.h:151
float fillTextureEffectFullAlphaRatio
Definition: TESEffectShader.h:76
Color colorKey3
Definition: TESEffectShader.h:108
BGSSoundDescriptorForm * ambientSound
Definition: TESEffectShader.h:148
float colorKey2ColorKeyTime
Definition: TESEffectShader.h:113
float particleShaderParticleLifetimeVariance
Definition: TESEffectShader.h:92
D3DBLEND particleShaderSourceBlendMode
Definition: TESEffectShader.h:82
float edgeEffectFullAlphaTime
Definition: TESEffectShader.h:70
float particleShaderAnimatedStartFrame
Definition: TESEffectShader.h:164
float textureCountV
Definition: TESEffectShader.h:137
float colorKey3ColorAlpha
Definition: TESEffectShader.h:111
std::uint32_t sceneGraphEmitDepthLimit
Definition: TESEffectShader.h:177
Flags
Definition: TESEffectShader.h:29
float particleShaderInitialSpeedAlongNormal
Definition: TESEffectShader.h:93
Color colorKey1
Definition: TESEffectShader.h:106
float particleShaderInitialRotationVariance
Definition: TESEffectShader.h:118
float particleShaderAnimatedFrameCountVariance
Definition: TESEffectShader.h:170
Color fillTextureEffectColorKey2
Definition: TESEffectShader.h:150
float edgeEffectAlphaPulseFrequency
Definition: TESEffectShader.h:74
float particleShaderScaleKey2
Definition: TESEffectShader.h:102
float colorKey1ColorKeyTime
Definition: TESEffectShader.h:112
float holesEndVal
Definition: TESEffectShader.h:129
Color edgeEffectColor
Definition: TESEffectShader.h:68
float fillTextureEffectColorKeyScaleTimeColorKey1Time
Definition: TESEffectShader.h:155
stl::enumeration< Flags, std::uint32_t > flags
Definition: TESEffectShader.h:172
float particleShaderParticleLifetime
Definition: TESEffectShader.h:91
float edgeEffectFallOff
Definition: TESEffectShader.h:67
float fillTextureEffectColorKeyScaleTimeColorKey1Scale
Definition: TESEffectShader.h:152
float addonModelsFadeOutTime
Definition: TESEffectShader.h:140
float fillTextureEffectTextureScaleU
Definition: TESEffectShader.h:174
float colorKey2ColorAlpha
Definition: TESEffectShader.h:110
std::uint32_t pad0D4
Definition: TESEffectShader.h:122
float particleShaderScaleKey1
Definition: TESEffectShader.h:101
float addonModelsScaleStart
Definition: TESEffectShader.h:141
D3DCMPFUNC particleShaderZTestOperation
Definition: TESEffectShader.h:84
float edgeWidthAlphaUnits
Definition: TESEffectShader.h:131
float colorScale
Definition: TESEffectShader.h:159
float fillTextureEffectPersistentAlphaRatio
Definition: TESEffectShader.h:61
float birthPositionOffsetVariance
Definition: TESEffectShader.h:162
float particleShaderFullParticleBirthTime
Definition: TESEffectShader.h:87
float edgeEffectAlphaFadeInTime
Definition: TESEffectShader.h:69
D3DBLEND particleShaderDestBlendMode
Definition: TESEffectShader.h:85
float fillTextureEffectTextureAnimationSpeedU
Definition: TESEffectShader.h:64
float particleShaderFullParticleBirthRatio
Definition: TESEffectShader.h:89
float fillTextureEffectColorKeyScaleTimeColorKey3Scale
Definition: TESEffectShader.h:154
float particleShaderAnimatedFrameCount
Definition: TESEffectShader.h:169
std::uint32_t unk00
Definition: TESEffectShader.h:51
float edgeEffectAlphaPulseAmplitude
Definition: TESEffectShader.h:73
float fillTextureEffectAlphaFadeInTime
Definition: TESEffectShader.h:58
float particleShaderRotationSpeed
Definition: TESEffectShader.h:119
float particleShaderAnimatedStartFrameVariance
Definition: TESEffectShader.h:165
float particleShaderScaleKey2Time
Definition: TESEffectShader.h:104
float particleShaderInitialRotation
Definition: TESEffectShader.h:117
float particleShaderInitialVelocity3
Definition: TESEffectShader.h:97
float birthPositionOffset
Definition: TESEffectShader.h:161
float particleShaderAnimatedLoopStartVariance
Definition: TESEffectShader.h:168
Color colorKey2
Definition: TESEffectShader.h:107
float fillTextureEffectTextureAnimationSpeedV
Definition: TESEffectShader.h:65
std::uint32_t pad13C
Definition: TESEffectShader.h:146
float fillTextureEffectAlphaPulseFrequency
Definition: TESEffectShader.h:63
float particleShaderParticleBirthRampDownTime
Definition: TESEffectShader.h:88
float edgeEffectAlphaFadeOutTime
Definition: TESEffectShader.h:71
float particleShaderInitialSpeedAlongNormalVariance
Definition: TESEffectShader.h:116
float edgeEffectFullAlphaRatio
Definition: TESEffectShader.h:78
D3DBLEND membraneShaderDestBlendMode
Definition: TESEffectShader.h:80
float particleShaderScaleKey1Time
Definition: TESEffectShader.h:103
float edgeEffectPersistentAlphaRatio
Definition: TESEffectShader.h:72
float textureCountU
Definition: TESEffectShader.h:136
D3DBLENDOP membraneShaderBlendOperation
Definition: TESEffectShader.h:54
BGSDebris * addonModels
Definition: TESEffectShader.h:124
float particleShaderAnimatedEndFrame
Definition: TESEffectShader.h:166
D3DBLEND membraneShaderSourceBlendMode
Definition: TESEffectShader.h:53
float fillTextureEffectColorKeyScaleTimeColorKey2Scale
Definition: TESEffectShader.h:153
float addonModelsScaleEnd
Definition: TESEffectShader.h:142
D3DCMPFUNC membraneShaderZTestFunction
Definition: TESEffectShader.h:55
float particleShaderAcceleration1
Definition: TESEffectShader.h:98
float particleShaderParticleBirthRampUpTime
Definition: TESEffectShader.h:86
D3DBLENDOP particleShaderBlendOperation
Definition: TESEffectShader.h:83
float particleShaderInitialVelocity1
Definition: TESEffectShader.h:95
float fillTextureEffectAlphaFadeOutTime
Definition: TESEffectShader.h:60
float fillTextureEffectColorKeyScaleTimeColorKey2Time
Definition: TESEffectShader.h:156
float particleShaderAcceleration3
Definition: TESEffectShader.h:100
float fillTextureEffectTextureScaleV
Definition: TESEffectShader.h:175
float fillTextureEffectColorKeyScaleTimeColorKey3Time
Definition: TESEffectShader.h:157
float colorKey1ColorAlpha
Definition: TESEffectShader.h:109
float addonModelsScaleOutTime
Definition: TESEffectShader.h:144
float fillTextureEffectFullAlphaTime
Definition: TESEffectShader.h:59
float particleShaderAcceleration2
Definition: TESEffectShader.h:99
float fillTextureEffectAlphaPulseAmplitude
Definition: TESEffectShader.h:62
float particleShaderRotationSpeedVariance
Definition: TESEffectShader.h:120
Definition: TESEffectShader.h:189
RecordFlag
Definition: TESEffectShader.h:191
@ kIgnored
Definition: TESEffectShader.h:193
@ kDeleted
Definition: TESEffectShader.h:192