Showing the changes to libraries/render-utils/src/FramebufferCache.cpp (1 of 20 files). Show all
Unified · Split
| @@ -47,6 +47,8 @@ void FramebufferCache::setFrameBufferSize(QSize frameBufferSize) { · 46 unmodified lines | ||
| 47 | 47 | _lightingFramebuffer.reset(); |
| 48 | 48 | _depthPyramidFramebuffer.reset(); |
| 49 | 49 | _depthPyramidTexture.reset(); |
| 50 | + _curvatureFramebuffer.reset(); | |
| 51 | + _curvatureTexture.reset(); | |
| 50 | 52 | _occlusionFramebuffer.reset(); |
| 51 | 53 | _occlusionTexture.reset(); |
| 52 | 54 | _occlusionBlurredFramebuffer.reset(); |
| @@ -109,15 +111,12 @@ void FramebufferCache::createPrimaryFramebuffer() { · 56 unmodified lines | ||
| 109 | 111 | _depthPyramidFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 110 | 112 | _depthPyramidFramebuffer->setRenderBuffer(0, _depthPyramidTexture); |
| 111 | 113 | _depthPyramidFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| 112 | − | |
| 113 | − | |
| 114 | − | |
| 114 | + | |
| 115 | 115 | _curvatureTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element::COLOR_RGBA_32, width, height, gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR_MIP_POINT))); |
| 116 | 116 | _curvatureFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 117 | 117 | _curvatureFramebuffer->setRenderBuffer(0, _curvatureTexture); |
| 118 | 118 | _curvatureFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| 119 | 119 | |
| 120 | − | |
| 121 | 120 | resizeAmbientOcclusionBuffers(); |
| 122 | 121 | } |
| 123 | 122 | |
| @@ -266,7 +265,6 @@ gpu::TexturePointer FramebufferCache::getCurvatureTexture() { · 142 unmodified lines | ||
| 266 | 265 | return _curvatureTexture; |
| 267 | 266 | } |
| 268 | 267 | |
| 269 | − | |
| 270 | 268 | void FramebufferCache::setAmbientOcclusionResolutionLevel(int level) { |
| 271 | 269 | const int MAX_AO_RESOLUTION_LEVEL = 4; |
| 272 | 270 | level = std::max(0, std::min(level, MAX_AO_RESOLUTION_LEVEL)); |