Trying to add water
This commit is contained in:
@@ -37,7 +37,8 @@ void LightCullingPass::beginFrame(const Component::Camera& cam) {
|
||||
|
||||
void LightCullingPass::render() {
|
||||
query->beginQuery();
|
||||
timestamps->write(Gfx::SE_PIPELINE_STAGE_TOP_OF_PIPE_BIT, "LIGHTCULL");
|
||||
timestamps->begin();
|
||||
timestamps->write(Gfx::SE_PIPELINE_STAGE_TOP_OF_PIPE_BIT, "LightCullBegin");
|
||||
oLightGrid->pipelineBarrier(Gfx::SE_ACCESS_SHADER_READ_BIT, Gfx::SE_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, Gfx::SE_ACCESS_SHADER_WRITE_BIT,
|
||||
Gfx::SE_PIPELINE_STAGE_COMPUTE_SHADER_BIT);
|
||||
tLightGrid->pipelineBarrier(Gfx::SE_ACCESS_SHADER_READ_BIT, Gfx::SE_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, Gfx::SE_ACCESS_SHADER_WRITE_BIT,
|
||||
@@ -62,6 +63,8 @@ void LightCullingPass::render() {
|
||||
commands.add(std::move(computeCommand));
|
||||
// std::cout << "Execute" << std::endl;
|
||||
graphics->executeCommands(std::move(commands));
|
||||
timestamps->write(Gfx::SE_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, "LightCullEnd");
|
||||
timestamps->end();
|
||||
query->endQuery();
|
||||
oLightIndexList->pipelineBarrier(Gfx::SE_ACCESS_SHADER_WRITE_BIT, Gfx::SE_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
|
||||
Gfx::SE_ACCESS_SHADER_READ_BIT, Gfx::SE_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
|
||||
@@ -224,13 +227,14 @@ void LightCullingPass::publishOutputs() {
|
||||
resources->registerTextureOutput("LIGHTCULLING_OLIGHTGRID", Gfx::PTexture2D(oLightGrid));
|
||||
resources->registerTextureOutput("LIGHTCULLING_TLIGHTGRID", Gfx::PTexture2D(tLightGrid));
|
||||
|
||||
timestamps = graphics->createTimestampQuery(2, "LightCullTS");
|
||||
resources->registerTimestampQueryOutput("LIGHTCULL_TS", timestamps);
|
||||
query = graphics->createPipelineStatisticsQuery("LightCullPipelineStatistics");
|
||||
resources->registerQueryOutput("LIGHTCULL_QUERY", query);
|
||||
}
|
||||
|
||||
void LightCullingPass::createRenderPass() {
|
||||
depthAttachment = resources->requestRenderTarget("DEPTHPREPASS_DEPTH").getTexture();
|
||||
timestamps = resources->requestTimestampQuery("TIMESTAMP");
|
||||
}
|
||||
|
||||
void LightCullingPass::setupFrustums() {
|
||||
|
||||
Reference in New Issue
Block a user