|
|
|
|
|
|
|
|
|
|
cmd.SetGlobalVector(HDShaderIDs._GaussianPyramidColorMipSize, new Vector4(pyramidSideSize, pyramidSideSize, lodCount, 0)); |
|
|
|
|
|
|
|
cmd.Blit(m_CameraColorBufferRT, m_GaussianPyramidColorBuffer); |
|
|
|
cmd.Blit(m_CameraColorBufferRT, m_GaussianPyramidColorBufferRT); |
|
|
|
colorPyramidDesc.depthBufferBits = 0; |
|
|
|
colorPyramidDesc.colorFormat = RenderTextureFormat.ARGBHalf; |
|
|
|
colorPyramidDesc.msaaSamples = 1; |
|
|
|
colorPyramidDesc.useMipMap = false; |
|
|
|
|
|
|
|
for (int i = 0; i < lodCount; i++) |
|
|
|
{ |
|
|
|
colorPyramidDesc.width = colorPyramidDesc.width >> 1; |
|
|
|
|
|
|
|
|
|
|
cmd.ReleaseTemporaryRT(HDShaderIDs._DepthPyramidMips[0]); |
|
|
|
|
|
|
|
depthPyramidDesc.depthBufferBits = 0; |
|
|
|
depthPyramidDesc.colorFormat = RenderTextureFormat.RFloat; |
|
|
|
depthPyramidDesc.msaaSamples = 1; |
|
|
|
depthPyramidDesc.useMipMap = false; |
|
|
|
cmd.CopyTexture(HDShaderIDs._DepthPyramidMips[0], 0, 0, m_DepthPyramidBuffer, 0, 0); |
|
|
|
cmd.CopyTexture(HDShaderIDs._DepthPyramidMips[0], 0, 0, m_DepthPyramidBufferRT, 0, 0); |
|
|
|
|
|
|
|
for (int i = 0; i < lodCount; i++) |
|
|
|
{ |
|
|
|