浏览代码

Temp updates to enable MSAA rendering w/o errors

Temp MSAA RTs cannot have UAVs generated (enableRandomWrite)
The depth textures need bindMS = true, otherwise, CopyTexture and related ops fail

Now, the light list gen needs to be fixed, and then we can start making progress!
/main
Robert Srinivasiah 7 年前
当前提交
d3425de4
共有 3 个文件被更改,包括 7 次插入1 次删除
  1. 5
      ScriptableRenderPipeline/Core/CoreRP/CoreUtils.cs
  2. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
  3. 1
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs

5
ScriptableRenderPipeline/Core/CoreRP/CoreUtils.cs


baseDesc.sRGB = (readWrite != RenderTextureReadWrite.Linear);
// TODO: Explicit MSAA support will come in later
if ((format == RenderTextureFormat.Depth) && baseDesc.msaaSamples > 1)
baseDesc.bindMS = true;
return new RenderTexture(baseDesc);
}

baseDesc.colorFormat = format;
baseDesc.sRGB = (readWrite != RenderTextureReadWrite.Linear);
baseDesc.msaaSamples = msaaSamples;
if (msaaSamples > 1)
enableRandomWrite = false;
baseDesc.enableRandomWrite = enableRandomWrite;
}

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


bool m_FullScreenDebugPushed;
// temp hack
public const int kMsaaSamplesFixed = 2;
public const int kMsaaSamplesFixed = 1;
public HDRenderPipeline(HDRenderPipelineAsset asset)
{

1
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs


static int s_GenListPerBigTileKernel;
const bool k_UseDepthBuffer = true; // only has an impact when EnableClustered is true (requires a depth-prepass)
//const bool k_UseDepthBuffer = false; // only has an impact when EnableClustered is true (requires a depth-prepass)
const int k_Log2NumClusters = 6; // accepted range is from 0 to 6. NumClusters is 1<<g_iLog2NumClusters
const float k_ClustLogBase = 1.02f; // each slice 2% bigger than the previous

正在加载...
取消
保存