Add static chunks caching to Global SDF

This commit is contained in:
Wojciech Figat
2022-04-19 17:17:27 +02:00
parent fe430e81ad
commit 1523fa98ec
3 changed files with 232 additions and 89 deletions

View File

@@ -45,6 +45,7 @@ private:
int32 _modelsBufferCount;
float _voxelSize;
BoundingBox _cascadeBounds;
class GlobalSignDistanceFieldCustomBuffer* _sdfData;
public:
/// <summary>
@@ -73,7 +74,7 @@ public:
void RenderDebug(RenderContext& renderContext, GPUContext* context, GPUTexture* output);
// Rasterize Model SDF into the Global SDF. Call it from actor Draw() method during DrawPass::GlobalSDF.
void RasterizeModelSDF(const ModelBase::SDFData& sdf, const Matrix& localToWorld, const BoundingBox& objectBounds);
void RasterizeModelSDF(Actor* actor, const ModelBase::SDFData& sdf, const Matrix& localToWorld, const BoundingBox& objectBounds);
private:
#if COMPILE_WITH_DEV_ENV