CommonLibVR
BSUtilityShader.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSShader.h"
4 
5 namespace RE
6 {
7  class BSUtilityShader : public BSShader
8  {
9  public:
10  inline static constexpr auto RTTI = RTTI_BSUtilityShader;
11  inline static constexpr auto VTABLE = VTABLE_BSUtilityShader;
12 
13  enum class Flags
14  {
15  None = 0,
16  Vc = 1 << 0,
17  Texture = 1 << 1,
18  Skinned = 1 << 2,
19  Normals = 1 << 3,
20  BinormalTangent = 1 << 4,
21  AlphaTest = 1 << 7,
22  LodLandscape = 1 << 8,
23  RenderNormal = 1 << 9,
24  RenderNormalFalloff = 1 << 10,
25  RenderNormalClamp = 1 << 11,
26  RenderNormalClear = 1 << 12,
27  RenderDepth = 1 << 13,
28  RenderShadowmap = 1 << 14,
29  RenderShadowmapClamped = 1 << 15,
30  GrayscaleToAlpha = 1 << 15,
31  RenderShadowmapPb = 1 << 16,
32  AdditionalAlphaMask = 1 << 16,
33  DepthWriteDecals = 1 << 17,
34  DebugShadowSplit = 1 << 18,
35  DebugColor = 1 << 19,
36  GrayscaleMask = 1 << 20,
37  RenderShadowmask = 1 << 21,
38  RenderShadowmaskSpot = 1 << 22,
39  RenderShadowmaskPb = 1 << 23,
40  RenderShadowmaskDpb = 1 << 24,
41  RenderBaseTexture = 1 << 25,
42  TreeAnim = 1 << 26,
43  LodObject = 1 << 27,
44  LocalMapFogOfWar = 1 << 28,
45  OpaqueEffect = 1 << 29,
46  };
47 
49  {
50  REL::Relocation<BSUtilityShader**> singleton{ RELOCATION_ID(528354, 415300) };
51  return *singleton;
52  }
53  ~BSUtilityShader() override; // 00
54 
55  // override (BSShader)
56  bool SetupTechnique(std::uint32_t globalTechnique) override; // 02
57  void RestoreTechnique(std::uint32_t globalTechnique) override; // 03
58  void SetupGeometry(BSRenderPass* pass, uint32_t flags) override; // 06
59  void RestoreGeometry(BSRenderPass* pass, uint32_t flags) override; // 07
60 
61  // members
62  std::uint64_t unk90; // 90
63  };
64  static_assert(sizeof(BSUtilityShader) == 0x98);
65 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:702
Definition: Relocation.h:210
Definition: BSRenderPass.h:11
Definition: BSShader.h:111
Definition: BSUtilityShader.h:8
std::uint64_t unk90
Definition: BSUtilityShader.h:62
Flags
Definition: BSUtilityShader.h:14
void RestoreGeometry(BSRenderPass *pass, uint32_t flags) override
static constexpr auto RTTI
Definition: BSUtilityShader.h:10
void RestoreTechnique(std::uint32_t globalTechnique) override
static constexpr auto VTABLE
Definition: BSUtilityShader.h:11
~BSUtilityShader() override
bool SetupTechnique(std::uint32_t globalTechnique) override
static BSUtilityShader * GetSingleton()
Definition: BSUtilityShader.h:48
void SetupGeometry(BSRenderPass *pass, uint32_t flags) override
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 3 > VTABLE_BSUtilityShader
Definition: Offsets_VTABLE.h:10561
constexpr REL::ID RTTI_BSUtilityShader(static_cast< std::uint64_t >(692069))