History

Intoducing the bluring as a separate Job reusable and the first version of curvature

samcake committed 10 years ago

Commit 75a5f6b1 parent 8d9057020 files · +606 −114Browse files

Showing the changes to libraries/render-utils/src/FramebufferCache.cpp (1 of 20 files). Show all

Unified · Split

libraries/render-utils/src/FramebufferCache.cpp+3−5
@@ -47,6 +47,8 @@ void FramebufferCache::setFrameBufferSize(QSize frameBufferSize) { · 46 unmodified lines
4747 _lightingFramebuffer.reset();
4848 _depthPyramidFramebuffer.reset();
4949 _depthPyramidTexture.reset();
50+ _curvatureFramebuffer.reset();
51+ _curvatureTexture.reset();
5052 _occlusionFramebuffer.reset();
5153 _occlusionTexture.reset();
5254 _occlusionBlurredFramebuffer.reset();
@@ -109,15 +111,12 @@ void FramebufferCache::createPrimaryFramebuffer() { · 56 unmodified lines
109111 _depthPyramidFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create());
110112 _depthPyramidFramebuffer->setRenderBuffer(0, _depthPyramidTexture);
111113 _depthPyramidFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat);
112−
113−
114−
114+
115115 _curvatureTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element::COLOR_RGBA_32, width, height, gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR_MIP_POINT)));
116116 _curvatureFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create());
117117 _curvatureFramebuffer->setRenderBuffer(0, _curvatureTexture);
118118 _curvatureFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat);
119119
120−
121120 resizeAmbientOcclusionBuffers();
122121 }
123122
@@ -266,7 +265,6 @@ gpu::TexturePointer FramebufferCache::getCurvatureTexture() { · 142 unmodified lines
266265 return _curvatureTexture;
267266 }
268267
269−
270268 void FramebufferCache::setAmbientOcclusionResolutionLevel(int level) {
271269 const int MAX_AO_RESOLUTION_LEVEL = 4;
272270 level = std::max(0, std::min(level, MAX_AO_RESOLUTION_LEVEL));