Refactor Global SDF to use a single texture for all cascades

This commit is contained in:
Wojciech Figat
2022-06-17 10:41:04 +02:00
parent bc8cc75ad8
commit 2e06d1ce2a
14 changed files with 204 additions and 194 deletions

View File

@@ -23,12 +23,9 @@ public:
// Binding data for the GPU.
struct BindingData
{
GPUTexture* Cascades[4];
GPUTexture* CascadeMips[4];
GPUTexture* Texture;
GPUTexture* TextureMip;
ConstantsData Constants;
void BindCascades(GPUContext* context, int32 srvSlot);
void BindCascadeMips(GPUContext* context, int32 srvSlot);
};
private:
@@ -39,8 +36,7 @@ private:
GPUShaderProgramCS* _csRasterizeModel1 = nullptr;
GPUShaderProgramCS* _csRasterizeHeightfield = nullptr;
GPUShaderProgramCS* _csClearChunk = nullptr;
GPUShaderProgramCS* _csGenerateMip0 = nullptr;
GPUShaderProgramCS* _csGenerateMip1 = nullptr;
GPUShaderProgramCS* _csGenerateMip = nullptr;
GPUConstantBuffer* _cb0 = nullptr;
GPUConstantBuffer* _cb1 = nullptr;