improved server
This commit is contained in:
@@ -191,7 +191,7 @@ void IVulkan::Frame()
|
||||
{
|
||||
mat4 perspective;
|
||||
glm_mat4_inv(g_cameraView, g_cameraDataMap->viewprojection);
|
||||
glm_perspective(glm_rad(90),(float)g_nWindowWidth/g_nWindowHeight, 0.01, 100, perspective);
|
||||
glm_perspective(glm_rad(68),(float)g_nWindowWidth/g_nWindowHeight, 0.01, 10000, perspective);
|
||||
glm_rotate(perspective, glm_rad(90), (vec4){1,0,0,0});
|
||||
glm_scale(perspective, (vec4){1,-1,1,1});
|
||||
glm_rotate(perspective, glm_rad(90), (vec4){0,0,1,0});
|
||||
@@ -270,28 +270,26 @@ void IVulkan::Frame()
|
||||
}
|
||||
);
|
||||
|
||||
VkImageCopy imageCopyRegion = {};
|
||||
VkImageBlit imageCopyRegion = {};
|
||||
imageCopyRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
imageCopyRegion.srcSubresource.mipLevel = 0;
|
||||
imageCopyRegion.srcSubresource.baseArrayLayer = 0;
|
||||
imageCopyRegion.srcSubresource.layerCount = 1;
|
||||
imageCopyRegion.srcOffset = {0, 0, 0};
|
||||
imageCopyRegion.srcOffsets[0] = {0, 0, 0};
|
||||
imageCopyRegion.srcOffsets[1] = {(int)g_nWindowWidth, (int)g_nWindowHeight, 1};
|
||||
|
||||
imageCopyRegion.dstSubresource = imageCopyRegion.srcSubresource;
|
||||
imageCopyRegion.dstOffset = {0, 0, 0};
|
||||
imageCopyRegion.dstOffsets[0] = {0, 0, 0};
|
||||
imageCopyRegion.dstOffsets[1] = {(int)g_nWindowWidth, (int)g_nWindowHeight, 1};
|
||||
|
||||
imageCopyRegion.extent.width = g_nWindowWidth;
|
||||
imageCopyRegion.extent.height = g_nWindowHeight;
|
||||
imageCopyRegion.extent.depth = 1;
|
||||
|
||||
vkCmdCopyImage(
|
||||
vkCmdBlitImage(
|
||||
g_vkCommandBuffer,
|
||||
((CVkImage*)g_meshColor)->m_image.m_image,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
|
||||
g_swapchainImage,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
1,
|
||||
&imageCopyRegion
|
||||
1, &imageCopyRegion,
|
||||
VK_FILTER_NEAREST
|
||||
);
|
||||
for (auto &step: g_StepShading)
|
||||
step.pPipeline->Frame(0);
|
||||
|
||||
Reference in New Issue
Block a user