Showing the changes to libraries/render-utils/src/DeferredFramebuffer.cpp (1 of 13 files). Show all
Unified · Split
| @@ -53,9 +53,9 @@ void DeferredFramebuffer::allocate() { · 52 unmodified lines | |||
| 53 | 53 | ||
| 54 | auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_POINT); | 54 | auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_POINT); |
| 55 | 55 | ||
| 56 | _deferredColorTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(colorFormat, width, height, 1, defaultSampler)); | 56 | _deferredColorTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(colorFormat, width, height, gpu::Texture::SINGLE_MIP, defaultSampler)); |
| 57 | _deferredNormalTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(linearFormat, width, height, 1, defaultSampler)); | 57 | _deferredNormalTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(linearFormat, width, height, gpu::Texture::SINGLE_MIP, defaultSampler)); |
| 58 | _deferredSpecularTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(colorFormat, width, height, 1, defaultSampler)); | 58 | _deferredSpecularTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(colorFormat, width, height, gpu::Texture::SINGLE_MIP, defaultSampler)); |
| 59 | 59 | ||
| 60 | _deferredFramebuffer->setRenderBuffer(0, _deferredColorTexture); | 60 | _deferredFramebuffer->setRenderBuffer(0, _deferredColorTexture); |
| 61 | _deferredFramebuffer->setRenderBuffer(1, _deferredNormalTexture); | 61 | _deferredFramebuffer->setRenderBuffer(1, _deferredNormalTexture); |
| @@ -65,7 +65,7 @@ void DeferredFramebuffer::allocate() { · 3 unmodified lines | |||
| 65 | 65 | ||
| 66 | auto depthFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format | 66 | auto depthFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format |
| 67 | if (!_primaryDepthTexture) { | 67 | if (!_primaryDepthTexture) { |
| 68 | _primaryDepthTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(depthFormat, width, height, 1, defaultSampler)); | 68 | _primaryDepthTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(depthFormat, width, height, gpu::Texture::SINGLE_MIP, defaultSampler)); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | _deferredFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); | 71 | _deferredFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| @@ -75,7 +75,7 @@ void DeferredFramebuffer::allocate() { · 3 unmodified lines | |||
| 75 | 75 | ||
| 76 | auto smoothSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_MIP_LINEAR); | 76 | auto smoothSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_MIP_LINEAR); |
| 77 | 77 | ||
| 78 | _lightingTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(gpu::Element(gpu::SCALAR, gpu::FLOAT, gpu::R11G11B10), width, height, 1, defaultSampler)); | 78 | _lightingTexture = gpu::TexturePointer(gpu::Texture::createRenderBuffer(gpu::Element(gpu::SCALAR, gpu::FLOAT, gpu::R11G11B10), width, height, gpu::Texture::SINGLE_MIP, defaultSampler)); |
| 79 | _lightingFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("lighting")); | 79 | _lightingFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("lighting")); |
| 80 | _lightingFramebuffer->setRenderBuffer(0, _lightingTexture); | 80 | _lightingFramebuffer->setRenderBuffer(0, _lightingTexture); |
| 81 | _lightingFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); | 81 | _lightingFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |