CommonLibSSE (powerof3)
BSImagespaceShader.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSShader.h"
5 
6 namespace RE
7 {
8  class BSComputeShader;
9 
11  public BSShader, // 000
12  public ImageSpaceEffect // 090
13  {
14  public:
15  inline static constexpr auto RTTI = RTTI_BSImagespaceShader;
16  inline static constexpr auto VTABLE = VTABLE_BSImagespaceShader;
17 
18  struct ShaderMacro
19  {
20  // members
21  const char* name; // 00
22  const char* definition; // 08
23  };
24  static_assert(sizeof(ShaderMacro) == 0x10);
25 
26  ~BSImagespaceShader() override; // 00
27 
28  // override (BSShader)
29  void Setup(ImageSpaceManager* a_manager, ImageSpaceEffectParam* a_param) override; // 02
30  void ShutDown() override; // 03
31  bool IsActive() override; // 06
32  bool UpdateParams(ImageSpaceEffectParam* a_param) override; // 07
33  bool RestoreRenderStates(ImageSpaceEffectParam* a_param) override; // 09
34 
35  // add
36  virtual void PreRender(); // 0A - { return; }
37  virtual void PostRender(); // 0B - { return; }
38  virtual void DispatchComputeShader(uint32_t a_threadGroupCountX, uint32_t a_threadGroupCountY, uint32_t a_threadGroupCountZ); // 0C
39  virtual void GetShaderMacros(ShaderMacro* a_macros); // 0D
40  virtual void LoadShaders(); // 0E
41 
43  {
44  auto isShader = malloc<BSImagespaceShader>();
45  std::memset(reinterpret_cast<void*>(isShader), 0, sizeof(BSImagespaceShader));
46  if (isShader) {
47  isShader->Ctor();
48  }
49  return isShader;
50  }
51 
52  // members
53  const char* name; // 120
54  const char* originalShaderName; // 128
55  std::uint64_t unk130; // 130
61  bool unk1A0; // 1A0
62  bool isComputeShader; // 1A1
63 
64  private:
65  BSImagespaceShader* Ctor()
66  {
67  using func_t = decltype(&BSImagespaceShader::Ctor);
68  static REL::Relocation<func_t> func{ RELOCATION_ID(100943, 107725) };
69  BSImagespaceShader* isShader = func(this);
70  stl::emplace_vtable<BSImagespaceShader>(isShader);
71  return isShader;
72  }
73  };
74  static_assert(sizeof(BSImagespaceShader) == 0x1A8);
75 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:505
Definition: Relocation.h:210
Definition: BSComputeShader.h:10
Definition: BSImagespaceShader.h:13
BSComputeShader * computeShader
Definition: BSImagespaceShader.h:60
virtual void LoadShaders()
BSTArray< BSFixedString > samplerNames
Definition: BSImagespaceShader.h:58
void Setup(ImageSpaceManager *a_manager, ImageSpaceEffectParam *a_param) override
BSTArray< BSFixedString > uavNames
Definition: BSImagespaceShader.h:59
virtual void DispatchComputeShader(uint32_t a_threadGroupCountX, uint32_t a_threadGroupCountY, uint32_t a_threadGroupCountZ)
bool unk1A0
Definition: BSImagespaceShader.h:61
std::uint64_t unk130
Definition: BSImagespaceShader.h:55
virtual void PreRender()
static constexpr auto RTTI
Definition: BSImagespaceShader.h:15
const char * name
Definition: BSImagespaceShader.h:53
bool UpdateParams(ImageSpaceEffectParam *a_param) override
virtual void GetShaderMacros(ShaderMacro *a_macros)
static BSImagespaceShader * Create()
Definition: BSImagespaceShader.h:42
bool isComputeShader
Definition: BSImagespaceShader.h:62
~BSImagespaceShader() override
virtual void PostRender()
BSTArray< BSFixedString > psConstantNames
Definition: BSImagespaceShader.h:57
const char * originalShaderName
Definition: BSImagespaceShader.h:54
bool IsActive() override
void ShutDown() override
BSTArray< BSFixedString > vsConstantNames
Definition: BSImagespaceShader.h:56
static constexpr auto VTABLE
Definition: BSImagespaceShader.h:16
bool RestoreRenderStates(ImageSpaceEffectParam *a_param) override
Definition: BSShader.h:111
Definition: BSTArray.h:378
Definition: ImageSpaceEffectParam.h:6
Definition: ImageSpaceEffect.h:12
Definition: ImageSpaceManager.h:16
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BSImagespaceShader(static_cast< std::uint64_t >(691880))
constexpr std::array< REL::ID, 4 > VTABLE_BSImagespaceShader
Definition: Offsets_VTABLE.h:9062
Definition: BSImagespaceShader.h:19
const char * definition
Definition: BSImagespaceShader.h:22
const char * name
Definition: BSImagespaceShader.h:21