Showing the changes to libraries/render-utils/src/FramebufferCache.cpp (1 of 2 files). Show all
Unified · Split
| @@ -59,7 +59,8 @@ void FramebufferCache::createPrimaryFramebuffer() { · 58 unmodified lines | ||
| 59 | 59 | _deferredFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 60 | 60 | _deferredFramebufferDepthColor = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 61 | 61 | |
| 62 | − auto colorFormat = gpu::Element::COLOR_RGBA_32; | |
| 62 | + // auto colorFormat = gpu::Element::COLOR_RGBA_32; | |
| 63 | + auto colorFormat = gpu::Element::COLOR_SRGBA_32; | |
| 63 | 64 | auto width = _frameBufferSize.width(); |
| 64 | 65 | auto height = _frameBufferSize.height(); |
| 65 | 66 | |
| @@ -95,10 +96,7 @@ void FramebufferCache::createPrimaryFramebuffer() { · 29 unmodified lines | ||
| 95 | 96 | |
| 96 | 97 | auto smoothSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_MIP_LINEAR); |
| 97 | 98 | |
| 98 | − // FIXME: Decide on the proper one, let s stick to R11G11B10 for now | |
| 99 | − //_lightingTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element::COLOR_RGBA_32, width, height, defaultSampler)); | |
| 100 | 99 | _lightingTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::SCALAR, gpu::FLOAT, gpu::R11G11B10), width, height, defaultSampler)); |
| 101 | − //_lightingTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::HALF, gpu::RGBA), width, height, defaultSampler)); | |
| 102 | 100 | _lightingFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 103 | 101 | _lightingFramebuffer->setRenderBuffer(0, _lightingTexture); |
| 104 | 102 | _lightingFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| @@ -212,7 +210,7 @@ gpu::TexturePointer FramebufferCache::getLightingTexture() { · 107 unmodified lines | ||
| 212 | 210 | |
| 213 | 211 | gpu::FramebufferPointer FramebufferCache::getFramebuffer() { |
| 214 | 212 | if (_cachedFramebuffers.isEmpty()) { |
| 215 | − _cachedFramebuffers.push_back(gpu::FramebufferPointer(gpu::Framebuffer::create(gpu::Element::COLOR_RGBA_32, _frameBufferSize.width(), _frameBufferSize.height()))); | |
| 213 | + _cachedFramebuffers.push_back(gpu::FramebufferPointer(gpu::Framebuffer::create(gpu::Element::COLOR_SRGBA_32, _frameBufferSize.width(), _frameBufferSize.height()))); | |
| 216 | 214 | } |
| 217 | 215 | gpu::FramebufferPointer result = _cachedFramebuffers.front(); |
| 218 | 216 | _cachedFramebuffers.pop_front(); |