コンテンツへ
#7
by 葡萄 » 6年前
#6
by ISLe » 6年前
#5
by manntera » 6年前
#4
コード:
//ステンシルステートの初期化(3D用) ZeroMemory(&depthStencilDesc, sizeof(depthStencilDesc)); //ステンシルステート設定 depthStencilDesc.DepthEnable = true; depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL; depthStencilDesc.DepthFunc = D3D11_COMPARISON_LESS; depthStencilDesc.StencilEnable = true; depthStencilDesc.StencilReadMask = 0xFF; depthStencilDesc.StencilWriteMask = 0xFF; depthStencilDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP; depthStencilDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR; depthStencilDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP; depthStencilDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS; depthStencilDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP; depthStencilDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR; depthStencilDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP; depthStencilDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
FLOAT fov = XM_PIDIV4; FLOAT Asspect = Viewport.Width / Viewport.Height; //Viewportの中身は正しいウィンドウ幅が入っている FLOAT Near = 0.01f, Far = 1000.0f; XMMatrixTranspose(XMMatrixPerspectiveFovLH(fov, Asspect, Near, Far));
#3
#2
#1
ページトップ