「VulkanのViewportをDirect3D準拠にする」の版間の差分

提供:MonoBook
ページの作成:「* Y軸を反転させる * Depth範囲は0.0-1.0 <source lang="csharp"> VkViewport viewport = new() { x = 0.0f, y = MainWindow.Extent.height, width = MainWin…」
 
編集の要約なし
 
3行目: 3行目:


<source lang="csharp">
<source lang="csharp">
VkViewport viewport = new()
var viewport = new VkViewport
{
{
     x = 0.0f,
     x = 0.0f,

2023年6月13日 (火) 05:58時点における最新版

  • 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);