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; } }