MCPcopy Create free account
hub / github.com/DiligentGraphics/DiligentFX / PSOKey

Method PSOKey

PBR/src/PBR_Renderer.cpp:66–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64} // namespace HLSL
65
66PBR_Renderer::PSOKey::PSOKey(PSO_FLAGS _Flags,
67 ALPHA_MODE _AlphaMode,
68 CULL_MODE _CullMode,
69 DebugViewType _DebugView,
70 LoadingAnimationMode _LoadingAnimation,
71 Uint64 _UserValue) noexcept :
72 Flags{_Flags},
73 AlphaMode{_AlphaMode},
74 CullMode{_CullMode},
75 DebugView{_DebugView},
76 LoadingAnimation{_LoadingAnimation},
77 UserValue{_UserValue}
78{
79 if (Flags & PSO_FLAG_UNSHADED)
80 {
81 AlphaMode = ALPHA_MODE_OPAQUE;
82
83 constexpr auto SupportedUnshadedFlags = PSO_FLAG_USE_JOINTS | PSO_FLAG_ALL_USER_DEFINED | PSO_FLAG_UNSHADED;
84 Flags &= SupportedUnshadedFlags;
85
86 DebugView = DebugViewType::None;
87 }
88
89 Hash = ComputeHash(Flags, AlphaMode, CullMode, static_cast<Uint32>(DebugView), static_cast<Uint32>(LoadingAnimation), UserValue);
90}
91
92static const char* GetTextureAttribString(PBR_Renderer::TEXTURE_ATTRIB_ID Id)
93{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected