Added some comments

This commit is contained in:
Olivier Prat 2018-10-03 08:43:51 +02:00
parent 8ad58754da
commit b131de9e51

View file

@ -86,6 +86,7 @@ void LinearDepthFramebuffer::allocate() {
const uint16_t HALF_LINEAR_DEPTH_MAX_MIP_LEVEL = 5;
// Point sampling of the depth, as well as the clamp to edge, are needed for the AmbientOcclusionEffect with HBAO
const auto depthSamplerHalf = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_MIP_POINT, gpu::Sampler::WRAP_CLAMP);
// The depth format here is half float as it increases performance in the AmbientOcclusion. But it might be needed elsewhere...
_halfLinearDepthTexture = gpu::Texture::createRenderBuffer(gpu::Element(gpu::SCALAR, gpu::HALF, gpu::RED), _halfFrameSize.x, _halfFrameSize.y, HALF_LINEAR_DEPTH_MAX_MIP_LEVEL,
depthSamplerHalf);