浏览代码

Cleanup some of the Gaussian pyramid gen code

/feature-ReflectionProbeFit
Robert Srinivasiah 7 年前
当前提交
4823e8b3
共有 1 个文件被更改,包括 5 次插入8 次删除
  1. 13
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs

13
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


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++)
{

正在加载...
取消
保存