VulkanのViewportをDirect3D準拠にする

提供: MonoBook
ナビゲーションに移動 検索に移動
  • Y軸を反転させる
  • Depth範囲は0.0-1.0
var viewport = new VkViewport
{
    x = 0.0f,
    y = MainWindow.Extent.height,
    width = MainWindow.Extent.width,
    height = -MainWindow.Extent.height,
    minDepth = 0.0f,
    maxDepth = 1.0f
};
vkCmdSetViewport(commandBuffer, viewport);