强制GBUFFER格式,用于调试
This commit is contained in:
parent
f4268b02ba
commit
ce5bc77185
@ -147,16 +147,21 @@ private:
|
|||||||
gbuffer.extent.height =GBUFFER_HEIGHT;
|
gbuffer.extent.height =GBUFFER_HEIGHT;
|
||||||
|
|
||||||
//根据候选格式表选择格式
|
//根据候选格式表选择格式
|
||||||
const VkFormat position_format =GetCandidateFormat(position_candidate_format, sizeof(position_candidate_format));
|
//const VkFormat position_format =GetCandidateFormat(position_candidate_format, sizeof(position_candidate_format));
|
||||||
const VkFormat color_format =GetCandidateFormat(color_candidate_format, sizeof(color_candidate_format));
|
//const VkFormat color_format =GetCandidateFormat(color_candidate_format, sizeof(color_candidate_format));
|
||||||
const VkFormat normal_format =GetCandidateFormat(normal_candidate_format, sizeof(normal_candidate_format));
|
//const VkFormat normal_format =GetCandidateFormat(normal_candidate_format, sizeof(normal_candidate_format));
|
||||||
const VkFormat depth_format =GetDepthCandidateFormat();
|
//const VkFormat depth_format =GetDepthCandidateFormat();
|
||||||
|
|
||||||
if(position_format ==FMT_UNDEFINED
|
//if(position_format ==FMT_UNDEFINED
|
||||||
||color_format ==FMT_UNDEFINED
|
// ||color_format ==FMT_UNDEFINED
|
||||||
||normal_format ==FMT_UNDEFINED
|
// ||normal_format ==FMT_UNDEFINED
|
||||||
||depth_format ==FMT_UNDEFINED)
|
// ||depth_format ==FMT_UNDEFINED)
|
||||||
return(false);
|
// return(false);
|
||||||
|
|
||||||
|
const VkFormat position_format =FMT_RGBA16F;
|
||||||
|
const VkFormat color_format =FMT_RGBA16F;
|
||||||
|
const VkFormat normal_format =FMT_RGBA16F;
|
||||||
|
const VkFormat depth_format =FMT_D16UN;
|
||||||
|
|
||||||
gbuffer.position=device->CreateAttachmentTextureColor(position_format, gbuffer.extent.width,gbuffer.extent.height);
|
gbuffer.position=device->CreateAttachmentTextureColor(position_format, gbuffer.extent.width,gbuffer.extent.height);
|
||||||
gbuffer.color =device->CreateAttachmentTextureColor(color_format, gbuffer.extent.width,gbuffer.extent.height);
|
gbuffer.color =device->CreateAttachmentTextureColor(color_format, gbuffer.extent.width,gbuffer.extent.height);
|
||||||
|
@ -141,7 +141,7 @@ public: //material相关
|
|||||||
Texture2D *CreateAttachmentTextureDepth(const VkFormat video_format,uint32_t width,uint32_t height)
|
Texture2D *CreateAttachmentTextureDepth(const VkFormat video_format,uint32_t width,uint32_t height)
|
||||||
{
|
{
|
||||||
return CreateAttachmentTexture( video_format,width,height,
|
return CreateAttachmentTexture( video_format,width,height,
|
||||||
VK_IMAGE_ASPECT_DEPTH_BIT|VK_IMAGE_ASPECT_STENCIL_BIT,
|
VK_IMAGE_ASPECT_DEPTH_BIT,//|VK_IMAGE_ASPECT_STENCIL_BIT,
|
||||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,
|
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,
|
||||||
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
|
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user