Trying to add water

This commit is contained in:
Dynamitos
2024-08-13 22:44:04 +02:00
parent 97244e87c1
commit 252a241208
43 changed files with 1408 additions and 219 deletions
@@ -26,7 +26,8 @@ void VisibilityPass::render() {
visibilitySet->writeChanges();
query->beginQuery();
timestamps->write(Gfx::SE_PIPELINE_STAGE_TOP_OF_PIPE_BIT, "VISIBILITY");
timestamps->begin();
timestamps->write(Gfx::SE_PIPELINE_STAGE_TOP_OF_PIPE_BIT, "VisibilityBegin");
Gfx::OComputeCommand command = graphics->createComputeCommand("VisibilityCommand");
command->bindPipeline(visibilityPipeline);
command->bindDescriptor({viewParamsSet, visibilitySet});
@@ -34,6 +35,8 @@ void VisibilityPass::render() {
Array<Gfx::OComputeCommand> commands;
commands.add(std::move(command));
graphics->executeCommands(std::move(commands));
timestamps->write(Gfx::SE_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, "VisibilityEnd");
timestamps->end();
query->endQuery();
cullingBuffer->pipelineBarrier(Gfx::SE_ACCESS_SHADER_WRITE_BIT, Gfx::SE_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
Gfx::SE_ACCESS_SHADER_READ_BIT,
@@ -85,8 +88,10 @@ void VisibilityPass::publishOutputs() {
});
resources->registerBufferOutput("CULLINGBUFFER", cullingBuffer);
timestamps = graphics->createTimestampQuery(2, "VisibilityTS");
resources->registerTimestampQueryOutput("VISIBILITY_TS", timestamps);
query = graphics->createPipelineStatisticsQuery("VisibilityPipelineStatistics");
timestamps = resources->requestTimestampQuery("TIMESTAMP");
resources->registerQueryOutput("VISIBILITY_QUERY", query);
}