mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 18:55:01 +02:00
Working generateMipWithPipeline command in batch
This commit is contained in:
parent
7e78e79685
commit
0316df4fae
1 changed files with 5 additions and 2 deletions
|
@ -413,10 +413,12 @@ void AmbientOcclusionEffect::run(const render::RenderContextPointer& renderConte
|
|||
|
||||
Transform model;
|
||||
|
||||
// We need this with the mips levels
|
||||
// We need this with the mips levels
|
||||
batch.pushProfileRange("Depth mip creation");
|
||||
batch.setModelTransform(model);
|
||||
batch.setPipeline(mipCreationPipeline);
|
||||
batch.generateTextureMipsWithPipeline(_framebuffer->getLinearDepthTexture());
|
||||
batch.popProfileRange();
|
||||
|
||||
model.setTranslation(glm::vec3(sMin, tMin, 0.0f));
|
||||
model.setScale(glm::vec3(sWidth, tHeight, 1.0f));
|
||||
|
@ -433,7 +435,8 @@ void AmbientOcclusionEffect::run(const render::RenderContextPointer& renderConte
|
|||
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
||||
|
||||
if (_parametersBuffer->getBlurRadius() > 0) {
|
||||
// Blur 1st pass
|
||||
PROFILE_RANGE_BATCH(batch, "Blur");
|
||||
// Blur 1st pass
|
||||
batch.setFramebuffer(occlusionBlurredFBO);
|
||||
batch.setPipeline(firstHBlurPipeline);
|
||||
batch.setResourceTexture(AmbientOcclusionEffect_OcclusionMapSlot, occlusionFBO->getRenderBuffer(0));
|
||||
|
|
Loading…
Reference in a new issue