This commit is contained in:
Wojciech Figat
2022-04-21 12:29:09 +02:00
parent e44c09aa6e
commit 60d2670e2e
2 changed files with 3 additions and 3 deletions

View File

@@ -47,8 +47,8 @@ void ModelInstanceActor::OnEnable()
void ModelInstanceActor::OnDisable() void ModelInstanceActor::OnDisable()
{ {
GetSceneRendering()->RemoveActor(this, _sceneRenderingKey);
// Base // Base
Actor::OnDisable(); Actor::OnDisable();
GetSceneRendering()->RemoveActor(this, _sceneRenderingKey);
} }

View File

@@ -477,7 +477,6 @@ bool GlobalSignDistanceFieldPass::Render(RenderContext& renderContext, GPUContex
data.CascadeMipResolution = resolutionMip; data.CascadeMipResolution = resolutionMip;
data.CascadeMipFactor = GLOBAL_SDF_RASTERIZE_MIP_FACTOR; data.CascadeMipFactor = GLOBAL_SDF_RASTERIZE_MIP_FACTOR;
context->BindUA(0, cascadeView); context->BindUA(0, cascadeView);
context->BindSR(0, _modelsBuffer->GetBuffer() ? _modelsBuffer->GetBuffer()->View() : nullptr);
context->BindCB(1, _cb1); context->BindCB(1, _cb1);
const int32 chunkDispatchGroups = GLOBAL_SDF_RASTERIZE_CHUNK_SIZE / GLOBAL_SDF_RASTERIZE_GROUP_SIZE; const int32 chunkDispatchGroups = GLOBAL_SDF_RASTERIZE_CHUNK_SIZE / GLOBAL_SDF_RASTERIZE_GROUP_SIZE;
bool anyChunkDispatch = false; bool anyChunkDispatch = false;
@@ -533,6 +532,7 @@ bool GlobalSignDistanceFieldPass::Render(RenderContext& renderContext, GPUContex
PROFILE_GPU_CPU("Update Models"); PROFILE_GPU_CPU("Update Models");
_modelsBuffer->Flush(context); _modelsBuffer->Flush(context);
} }
context->BindSR(0, _modelsBuffer->GetBuffer() ? _modelsBuffer->GetBuffer()->View() : nullptr);
// Rasterize non-empty chunk (first layer so can override existing chunk data) // Rasterize non-empty chunk (first layer so can override existing chunk data)
for (const auto& e : chunks) for (const auto& e : chunks)