MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / BindlessDeferred

Class BindlessDeferred

BindlessDeferred/BindlessDeferred.h:28–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26using namespace SampleFramework12;
27
28class BindlessDeferred : public App
29{
30
31protected:
32
33 FirstPersonCamera camera;
34
35 Skybox skybox;
36 SkyCache skyCache;
37
38 PostProcessor postProcessor;
39
40 // Model
41 Model sceneModels[uint64(Scenes::NumValues)];
42 const Model* currentModel = nullptr;
43 MeshRenderer meshRenderer;
44
45 RenderTexture mainTarget;
46 RenderTexture tangentFrameTarget;
47 RenderTexture uvTarget;
48 RenderTexture uvGradientsTarget;
49 RenderTexture materialIDTarget;
50 RenderTexture resolveTarget;
51 RenderTexture deferredMSAATarget;
52 DepthBuffer depthBuffer;
53
54 Texture decalTextures[AppSettings::NumDecalTextures];
55 StructuredBuffer decalBuffer;
56 StructuredBuffer decalBoundsBuffer;
57 StructuredBuffer decalInstanceBuffer;
58 RawBuffer decalClusterBuffer;
59 Array<Decal> decals;
60 uint64 numDecals = 0;
61 uint64 numIntersectingDecals = 0;
62
63 Array<SpotLight> spotLights;
64 StructuredBuffer spotLightBuffer;
65 StructuredBuffer spotLightBoundsBuffer;
66 StructuredBuffer spotLightInstanceBuffer;
67 RawBuffer spotLightClusterBuffer;
68 uint64 numIntersectingSpotLights = 0;
69
70 ID3D12RootSignature* clusterRS = nullptr;
71 CompiledShaderPtr clusterVS;
72 CompiledShaderPtr clusterFrontFacePS;
73 CompiledShaderPtr clusterBackFacePS;
74 CompiledShaderPtr clusterIntersectingPS;
75 ID3D12PipelineState* clusterFrontFacePSO = nullptr;
76 ID3D12PipelineState* clusterBackFacePSO = nullptr;
77 ID3D12PipelineState* clusterIntersectingPSO = nullptr;
78 RenderTexture clusterMSAATarget;
79
80 StructuredBuffer decalClusterVtxBuffer;
81 FormattedBuffer decalClusterIdxBuffer;
82
83 StructuredBuffer spotLightClusterVtxBuffer;
84 FormattedBuffer spotLightClusterIdxBuffer;
85 Array<Float3> coneVertices;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected