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 | _lightingFramebuffer.reset(); | 47 | _lightingFramebuffer.reset(); |
| 48 | _depthPyramidFramebuffer.reset(); | 48 | _depthPyramidFramebuffer.reset(); |
| 49 | _depthPyramidTexture.reset(); | 49 | _depthPyramidTexture.reset(); |
| 50 | _curvatureFramebuffer.reset(); | ||
| 51 | _curvatureTexture.reset(); | ||
| 50 | _occlusionFramebuffer.reset(); | 52 | _occlusionFramebuffer.reset(); |
| 51 | _occlusionTexture.reset(); | 53 | _occlusionTexture.reset(); |
| 52 | _occlusionBlurredFramebuffer.reset(); | 54 | _occlusionBlurredFramebuffer.reset(); |
| @@ -109,15 +111,12 @@ void FramebufferCache::createPrimaryFramebuffer() { · 56 unmodified lines | |||
| 109 | _depthPyramidFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); | 111 | _depthPyramidFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 110 | _depthPyramidFramebuffer->setRenderBuffer(0, _depthPyramidTexture); | 112 | _depthPyramidFramebuffer->setRenderBuffer(0, _depthPyramidTexture); |
| 111 | _depthPyramidFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); | 113 | _depthPyramidFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| 112 | 114 | ||
| 113 | |||
| 114 | |||
| 115 | _curvatureTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element::COLOR_RGBA_32, width, height, gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR_MIP_POINT))); | 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 | _curvatureFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); | 116 | _curvatureFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 117 | _curvatureFramebuffer->setRenderBuffer(0, _curvatureTexture); | 117 | _curvatureFramebuffer->setRenderBuffer(0, _curvatureTexture); |
| 118 | _curvatureFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); | 118 | _curvatureFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| 119 | 119 | ||
| 120 | |||
| 121 | resizeAmbientOcclusionBuffers(); | 120 | resizeAmbientOcclusionBuffers(); |
| 122 | } | 121 | } |
| 123 | 122 | ||
| @@ -266,7 +265,6 @@ gpu::TexturePointer FramebufferCache::getCurvatureTexture() { · 142 unmodified lines | |||
| 266 | return _curvatureTexture; | 265 | return _curvatureTexture; |
| 267 | } | 266 | } |
| 268 | 267 | ||
| 269 | |||
| 270 | void FramebufferCache::setAmbientOcclusionResolutionLevel(int level) { | 268 | void FramebufferCache::setAmbientOcclusionResolutionLevel(int level) { |
| 271 | const int MAX_AO_RESOLUTION_LEVEL = 4; | 269 | const int MAX_AO_RESOLUTION_LEVEL = 4; |
| 272 | level = std::max(0, std::min(level, MAX_AO_RESOLUTION_LEVEL)); | 270 | level = std::max(0, std::min(level, MAX_AO_RESOLUTION_LEVEL)); |