|
|
|
|
|
|
RTHandle.Release(m_HTile); |
|
|
|
} |
|
|
|
|
|
|
|
public void ClearNormalTargetAndHTile(CommandBuffer cmd, HDCamera camera, Color clearColor) |
|
|
|
public void ClearTargets(CommandBuffer cmd, HDCamera camera) |
|
|
|
// index 1 is normals
|
|
|
|
HDUtils.SetRenderTarget(cmd, camera, m_RTs[1], ClearFlag.Color, clearColor); |
|
|
|
// for alpha compositing, color is cleared to 0, alpha to 1
|
|
|
|
// https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch23.html
|
|
|
|
|
|
|
|
Color clearColor = new Color(0.0f, 0.0f, 0.0f, 1.0f); |
|
|
|
Color clearColorNormal = new Color(0.5f, 0.5f, 0.5f, 1.0f); // for normals 0.5 is neutral
|
|
|
|
HDUtils.SetRenderTarget(cmd, camera, m_RTs[0], ClearFlag.Color, clearColor); |
|
|
|
HDUtils.SetRenderTarget(cmd, camera, m_RTs[1], ClearFlag.Color, clearColorNormal); |
|
|
|
HDUtils.SetRenderTarget(cmd, camera, m_RTs[2], ClearFlag.Color, clearColor); |
|
|
|
HDUtils.SetRenderTarget(cmd, camera, m_HTile, ClearFlag.Color, CoreUtils.clearColorAllBlack); |
|
|
|
} |
|
|
|
|
|
|
|