/// <summary> /// Specify that the pass will use a Texture resource as a depth buffer. /// </summary> /// <param name="input">The Texture resource to use as a depth buffer during the pass.</param> /// <param name="flags">Specify the access level for the depth buffer. This allows you to say whether you will read from or write to the depth buffer, or do both.</param> /// <returns>An updated resource handle to the input resource.</returns> public TextureHandle UseDepthBuffer(TextureHandle input, DepthAccess flags) { CheckTransientTexture(input); m_RenderPass.SetDepthBuffer(input, flags); return(input); }
public void SetDepthBuffer(TextureHandle resource, DepthAccess flags) { depthBuffer = resource; if ((flags & DepthAccess.Read) != 0) { AddTextureRead(resource); } if ((flags & DepthAccess.Write) != 0) { AddTextureWrite(resource); } }
internal void SetDepthBuffer(TextureHandle resource, DepthAccess flags) { m_DepthBuffer = resource; if ((flags | DepthAccess.Read) != 0) { textureReadList.Add(resource); } if ((flags | DepthAccess.Write) != 0) { textureWriteList.Add(resource); } }
/// <summary> /// Specify that the pass will use a Texture resource as a depth buffer. /// </summary> /// <param name="input">The Texture resource to use as a depth buffer during the pass.</param> /// <param name="flags">Specify the access level for the depth buffer. This allows you to say whether you will read from or write to the depth buffer, or do both.</param> /// <returns>An updated resource handle to the input resource.</returns> public TextureHandle UseDepthBuffer(TextureHandle input, DepthAccess flags) { m_RenderPass.SetDepthBuffer(input, flags); if ((flags | DepthAccess.Read) != 0) { m_Resources.UpdateTextureLastRead(input, m_RenderPass.index); } if ((flags | DepthAccess.Write) != 0) { m_Resources.UpdateTextureFirstWrite(input, m_RenderPass.index); } return(input); }