History

CHanging the lighting BUffer format and adding tone mapping

Sam Cake committed 10 years ago

Commit 9faec321 parent 9ddc3c214 files · +120 −47Browse files

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

Unified · Split

libraries/render-utils/src/FramebufferCache.cpp+3−3
@@ -53,7 +53,7 @@ void FramebufferCache::createPrimaryFramebuffer() { · 52 unmodified lines
53 _deferredFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create());53 _deferredFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create());
54 _deferredFramebufferDepthColor = gpu::FramebufferPointer(gpu::Framebuffer::create());54 _deferredFramebufferDepthColor = gpu::FramebufferPointer(gpu::Framebuffer::create());
55 55
56 auto colorFormat = gpu::Element(gpu::VEC4, gpu::NUINT8, gpu::RGBA);56 auto colorFormat = gpu::Element::COLOR_RGBA_32;
57 auto width = _frameBufferSize.width();57 auto width = _frameBufferSize.width();
58 auto height = _frameBufferSize.height();58 auto height = _frameBufferSize.height();
59 59
@@ -87,8 +87,8 @@ void FramebufferCache::createPrimaryFramebuffer() { · 27 unmodified lines
87 auto tex = gpu::TexturePointer(gpu::Texture::create2D(colorFormat, width * 0.5, height * 0.5, defaultSampler));87 auto tex = gpu::TexturePointer(gpu::Texture::create2D(colorFormat, width * 0.5, height * 0.5, defaultSampler));
88 _selfieFramebuffer->setRenderBuffer(0, tex);88 _selfieFramebuffer->setRenderBuffer(0, tex);
89 89
90 _lightingTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::NUINT8, gpu::RGBA), width, height, defaultSampler));90 //_lightingTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element::COLOR_RGBA_32, width, height, defaultSampler));
91 //_lightingTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::NUINT8, gpu::SRGBA), width, height, defaultSampler));91 _lightingTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC3, gpu::NUINT8, gpu::R11G11B10), width, height, defaultSampler));
92 // _lightingTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::HALF, gpu::RGBA), width, height, defaultSampler));92 // _lightingTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::HALF, gpu::RGBA), width, height, defaultSampler));
93 _lightingFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create());93 _lightingFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create());
94 _lightingFramebuffer->setRenderBuffer(0, _lightingTexture);94 _lightingFramebuffer->setRenderBuffer(0, _lightingTexture);