CommonLibVR
BSLightingShaderMaterialBase.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/N/NiColor.h"
5 #include "RE/N/NiSmartPointer.h"
6 
7 namespace RE
8 {
9  class BSTextureSet;
10  class NiSourceTexture;
11  class NiStream;
12 
14  {
15  public:
16  inline static constexpr auto RTTI = RTTI_BSLightingShaderMaterialBase;
17  inline static constexpr auto VTABLE = VTABLE_BSLightingShaderMaterialBase;
18 
20 
21  // override (BSShaderMaterial)
22  BSShaderMaterial* Create() override = 0; // 01
23  void CopyMembers(BSShaderMaterial* a_other) override; // 02
24  bool DoIsCopy(BSShaderMaterial* a_other) override; // 03
25  std::uint32_t ComputeCRC32(void) override; // 04
26  BSShaderMaterial* GetDefault() override; // 05
27  Feature GetFeature() const override; // 06 - { return Feature::kDefault; }
28  Type GetType() const override; // 07 - { return Type::kLighting; }
29 
30  // add
31  virtual void OnLoadTextureSet(std::uint64_t a_arg1, BSTextureSet* a_textureSet); // 08
32  virtual void ClearTextures(); // 09
33  virtual void ReceiveValuesFromRootMaterial(bool a_skinned, bool a_rimLighting, bool a_softLighting, bool a_backLighting, bool a_MSN); // 0A
34  virtual void GetTextures(void); // 0B
35  virtual void SaveBinary(NiStream& a_stream); // 0C
36  virtual void LoadBinary(NiStream& a_stream); // 0D
37 
39  template <class T>
40  static T* CreateMaterial();
41 
45 
46  // members
48  std::uint32_t pad44; // 44
50  std::int32_t diffuseRenderTargetSourceIndex; // 50
51  std::uint32_t pad54; // 54
55  std::int32_t textureClampMode; // 70
56  std::int32_t pad74; // 70
58  float materialAlpha; // 80
59  float refractionPower; // 84
60  float specularPower; // 88
61  float specularColorScale; // 8C
63  float rimLightPower; // 94
64  std::uint64_t unk98; // 98
65  private:
66  KEEP_FOR_RE()
67  };
68  static_assert(sizeof(BSLightingShaderMaterialBase) == 0xA0);
69 
70  template <class T>
72  {
73  return static_cast<T*>(CreateMaterial(T::FEATURE));
74  }
75 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BSLightingShaderMaterialBase.h:14
float materialAlpha
Definition: BSLightingShaderMaterialBase.h:58
std::uint32_t pad44
Definition: BSLightingShaderMaterialBase.h:48
float specularPower
Definition: BSLightingShaderMaterialBase.h:60
virtual void OnLoadTextureSet(std::uint64_t a_arg1, BSTextureSet *a_textureSet)
void SetTextureSet(NiPointer< BSTextureSet > a_textureSet)
std::uint32_t pad54
Definition: BSLightingShaderMaterialBase.h:51
std::int32_t pad74
Definition: BSLightingShaderMaterialBase.h:56
float subSurfaceLightRolloff
Definition: BSLightingShaderMaterialBase.h:62
NiPointer< NiSourceTexture > specularBackLightingTexture
Definition: BSLightingShaderMaterialBase.h:54
static constexpr auto RTTI
Definition: BSLightingShaderMaterialBase.h:16
virtual void LoadBinary(NiStream &a_stream)
std::uint64_t unk98
Definition: BSLightingShaderMaterialBase.h:64
NiPointer< NiSourceTexture > rimSoftLightingTexture
Definition: BSLightingShaderMaterialBase.h:53
BSShaderMaterial * GetDefault() override
bool DoIsCopy(BSShaderMaterial *a_other) override
BSShaderMaterial * Create() override=0
virtual void GetTextures(void)
float refractionPower
Definition: BSLightingShaderMaterialBase.h:59
NiPointer< BSTextureSet > GetTextureSet() const
float specularColorScale
Definition: BSLightingShaderMaterialBase.h:61
Type GetType() const override
NiPointer< NiSourceTexture > diffuseTexture
Definition: BSLightingShaderMaterialBase.h:49
void CopyBaseMembers(BSLightingShaderMaterialBase *a_other)
virtual void ReceiveValuesFromRootMaterial(bool a_skinned, bool a_rimLighting, bool a_softLighting, bool a_backLighting, bool a_MSN)
NiPointer< NiSourceTexture > normalTexture
Definition: BSLightingShaderMaterialBase.h:52
NiPointer< BSTextureSet > textureSet
Definition: BSLightingShaderMaterialBase.h:57
NiColor specularColor
Definition: BSLightingShaderMaterialBase.h:47
Feature GetFeature() const override
static constexpr auto VTABLE
Definition: BSLightingShaderMaterialBase.h:17
static BSLightingShaderMaterialBase * CreateMaterial(Feature a_feature)
void CopyMembers(BSShaderMaterial *a_other) override
std::uint32_t ComputeCRC32(void) override
float rimLightPower
Definition: BSLightingShaderMaterialBase.h:63
std::int32_t textureClampMode
Definition: BSLightingShaderMaterialBase.h:55
virtual void SaveBinary(NiStream &a_stream)
std::int32_t diffuseRenderTargetSourceIndex
Definition: BSLightingShaderMaterialBase.h:50
static T * CreateMaterial()
Definition: BSLightingShaderMaterialBase.h:71
Definition: BSShaderMaterial.h:9
Type
Definition: BSShaderMaterial.h:39
Feature
Definition: BSShaderMaterial.h:15
Definition: BSTextureSet.h:9
Definition: NiColor.h:11
Definition: NiSmartPointer.h:9
Definition: NiStream.h:29
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_BSLightingShaderMaterialBase
Definition: Offsets_VTABLE.h:9202
constexpr REL::ID RTTI_BSLightingShaderMaterialBase(static_cast< std::uint64_t >(686055))