public void PrepareAsRenderTarget(CommandList commandList)
        {
            // Switch to render target
            commandList.ResourceBarrierTransition(Texture, GraphicsResourceState.DepthWrite);

            if (clearNeeded)
            {
                // TODO GRAPHICS REFACTOR
                commandList.Clear(Texture, DepthStencilClearOptions.DepthBuffer);
                clearNeeded = false;
            }
        }
 public void PrepareAsShaderResourceView(CommandList commandList)
 {
     commandList.ResourceBarrierTransition(Texture, GraphicsResourceState.PixelShaderResource);
 }