CommonLibSSE (powerof3)
BSShaderManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/N/NiBound.h"
4 #include "RE/N/NiColor.h"
5 #include "RE/N/NiPoint2.h"
6 #include "RE/N/NiSmartPointer.h"
7 #include "RE/N/NiTransform.h"
8 
9 namespace RE
10 {
11  class ShadowSceneNode;
12  class NiTexture;
13 
15  {
16  public:
18  {
19  kDefault = 0,
23 
24  kTotal = 5,
25  };
26 
27  class State
28  {
29  public:
31  {
32  static REL::Relocation<BSShaderManager::State*> singleton{ RELOCATION_ID(513211, 390951) };
33  return *singleton;
34  }
35 
36  // members
38  float timerValues[BSShaderTimerMode::kTotal]; // 020
40  bool interior; // 044
41  bool liteBrite; // 045
42  bool characterLightEnabled; // 046
43  std::uint8_t pad47; // 047
44  void* unk48; // 048
45  void* unk50; // 050
46  void* unk58; // 058
47  void* unk60; // 060
48  void* unk68; // 068
49  void* unk70; // 070
50  void* unk78; // 078
51  void* unk80; // 080
52  void* unk88; // 088
53  std::uint64_t unk90; // 090
54  float landLOFadeSeconds; // 098
55  float invFrameBufferRange; // 09C
60  float gridArrayLerpStart; // 0B8
61  std::uint32_t currentShaderTechnique; // 0BC
62  std::uint8_t sceneGraph; // 0C0
63  std::uint32_t debugMode; // 0C4
66  float characterLightParams[4]; // 10C - { Primary, Secondary, Luminance, Max Luminance }
68  std::uint32_t textureTransformCurrentBuffer; // 120
69  std::uint32_t textureTransformFlipMode; // 124
70  std::uint32_t cameraInWaterState; // 128
72  std::uint32_t pad13C; // 13C
73  std::uint32_t pad140; // 140
74  float waterIntersect; // 144
75  };
76  static_assert(sizeof(State) == 0x148);
77 
78  static void GetTexture(const char* a_path, bool a_demand, NiPointer<NiTexture>& a_textureOut, bool a_isHeightMap)
79  {
80  using func_t = decltype(&BSShaderManager::GetTexture);
81  static REL::Relocation<func_t> func{ RELOCATION_ID(98986, 105640) };
82  return func(a_path, a_demand, a_textureOut, a_isHeightMap);
83  }
84  };
85 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:505
Definition: Relocation.h:210
Definition: BSShaderManager.h:28
float leafAnimDampenDistStartSPU
Definition: BSShaderManager.h:56
float waterIntersect
Definition: BSShaderManager.h:74
bool interior
Definition: BSShaderManager.h:40
float invFrameBufferRange
Definition: BSShaderManager.h:55
std::uint32_t pad13C
Definition: BSShaderManager.h:72
std::uint32_t debugMode
Definition: BSShaderManager.h:63
void * unk68
Definition: BSShaderManager.h:48
float timerValues[BSShaderTimerMode::kTotal]
Definition: BSShaderManager.h:38
void * unk88
Definition: BSShaderManager.h:52
std::uint32_t cameraInWaterState
Definition: BSShaderManager.h:70
std::uint32_t textureTransformFlipMode
Definition: BSShaderManager.h:69
NiPoint2 gridArrayCenter
Definition: BSShaderManager.h:59
std::uint64_t unk90
Definition: BSShaderManager.h:53
NiTransform directionalAmbientTransform
Definition: BSShaderManager.h:64
float landLOFadeSeconds
Definition: BSShaderManager.h:54
std::uint32_t currentShaderTechnique
Definition: BSShaderManager.h:61
float leafAnimDampenDistEndSPU
Definition: BSShaderManager.h:57
float characterLightParams[4]
Definition: BSShaderManager.h:66
bool ambientSpecularEnabled
Definition: BSShaderManager.h:67
void * unk80
Definition: BSShaderManager.h:51
NiBound cachedPlayerBound
Definition: BSShaderManager.h:71
std::uint32_t pad140
Definition: BSShaderManager.h:73
NiPoint2 oldGridArrayCenter
Definition: BSShaderManager.h:58
NiColorA loadedRange
Definition: BSShaderManager.h:39
float gridArrayLerpStart
Definition: BSShaderManager.h:60
std::uint8_t pad47
Definition: BSShaderManager.h:43
ShadowSceneNode * shadowSceneNode[4]
Definition: BSShaderManager.h:37
NiColorA ambientSpecular
Definition: BSShaderManager.h:65
bool liteBrite
Definition: BSShaderManager.h:41
bool characterLightEnabled
Definition: BSShaderManager.h:42
void * unk58
Definition: BSShaderManager.h:46
std::uint32_t textureTransformCurrentBuffer
Definition: BSShaderManager.h:68
static BSShaderManager::State & GetSingleton()
Definition: BSShaderManager.h:30
void * unk70
Definition: BSShaderManager.h:49
void * unk48
Definition: BSShaderManager.h:44
void * unk50
Definition: BSShaderManager.h:45
std::uint8_t sceneGraph
Definition: BSShaderManager.h:62
void * unk78
Definition: BSShaderManager.h:50
void * unk60
Definition: BSShaderManager.h:47
Definition: BSShaderManager.h:15
BSShaderTimerMode
Definition: BSShaderManager.h:18
@ kDefault
Definition: BSShaderManager.h:19
@ kDelta
Definition: BSShaderManager.h:20
@ kTotal
Definition: BSShaderManager.h:24
@ kSystem
Definition: BSShaderManager.h:21
@ kRealDelta
Definition: BSShaderManager.h:22
static void GetTexture(const char *a_path, bool a_demand, NiPointer< NiTexture > &a_textureOut, bool a_isHeightMap)
Definition: BSShaderManager.h:78
Definition: NiBound.h:8
Definition: NiColor.h:281
Definition: NiPoint2.h:6
Definition: NiSmartPointer.h:9
Definition: NiTransform.h:9
Definition: ShadowSceneNode.h:18
Definition: AbsorbEffect.h:6