Showing the changes to libraries/render-utils/src/FramebufferCache.cpp (1 of 8 files). Show all
Unified · Split
| @@ -68,17 +68,21 @@ void FramebufferCache::createPrimaryFramebuffer() { · 67 unmodified lines | ||
| 68 | 68 | |
| 69 | 69 | _primaryFramebufferStencilColor->setRenderBuffer(0, _primaryColorTexture); |
| 70 | 70 | |
| 71 | − auto depthFormat = gpu::Element(gpu::SCALAR, gpu::FLOAT, gpu::DEPTH); | |
| 71 | + // auto depthFormat = gpu::Element(gpu::SCALAR, gpu::FLOAT, gpu::DEPTH); | |
| 72 | + auto depthFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format | |
| 72 | 73 | _primaryDepthTexture = gpu::TexturePointer(gpu::Texture::create2D(depthFormat, width, height, defaultSampler)); |
| 73 | 74 | |
| 74 | − auto stencilFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format | |
| 75 | − _primaryStencilTexture = gpu::TexturePointer(gpu::Texture::create2D(stencilFormat, width, height, defaultSampler)); | |
| 75 | + // auto stencilFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format | |
| 76 | + auto stencilFormat = depthFormat; | |
| 77 | + // _primaryStencilTexture = gpu::TexturePointer(gpu::Texture::create2D(stencilFormat, width, height, defaultSampler)); | |
| 78 | + _primaryStencilTexture = _primaryDepthTexture; | |
| 76 | 79 | |
| 77 | 80 | _primaryFramebufferFull->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| 78 | 81 | |
| 79 | 82 | _primaryFramebufferDepthColor->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| 80 | 83 | |
| 81 | − _primaryFramebufferStencilColor->setDepthStencilBuffer(_primaryStencilTexture, stencilFormat); | |
| 84 | + // _primaryFramebufferStencilColor->setDepthStencilBuffer(_primaryStencilTexture, stencilFormat); | |
| 85 | + _primaryFramebufferStencilColor = _primaryFramebufferDepthColor; | |
| 82 | 86 | |
| 83 | 87 | _selfieFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 84 | 88 | auto tex = gpu::TexturePointer(gpu::Texture::create2D(colorFormat, width * 0.5, height * 0.5, defaultSampler)); |