diff --git a/example/Vulkan/CMakeLists.txt b/example/Vulkan/CMakeLists.txt index bbe9c64d..c126892d 100644 --- a/example/Vulkan/CMakeLists.txt +++ b/example/Vulkan/CMakeLists.txt @@ -21,4 +21,6 @@ CreateProject(7.InlineGeometryScene InlineGeometryScene.cpp) CreateProject(8.Atomsphere Atomsphere.cpp) -CreateProject(9.Deferred Deferred.cpp TGATexture.cpp) \ No newline at end of file +CreateProject(9.Deferred Deferred.cpp TGATexture.cpp) + +CreateProject(10.TextureFormat TextureFormat.cpp TGATexture.cpp) \ No newline at end of file diff --git a/example/Vulkan/TextureFormat.cpp b/example/Vulkan/TextureFormat.cpp new file mode 100644 index 00000000..e69de29b diff --git a/res/shader/gbuffer_opaque.frag b/res/shader/gbuffer_opaque.frag index b90df622..6eecfe1f 100644 --- a/res/shader/gbuffer_opaque.frag +++ b/res/shader/gbuffer_opaque.frag @@ -23,7 +23,7 @@ void main() vec3 tnorm = (texture(TextureNormal,FragmentTexCoord).xyz*2.0-vec3(1.0))*TBN; outNormal=vec4(normalize(tnorm),1.0); -// outNormal=vec4(normalize(FragmentNormal),1.0); + //outNormal=vec4(normalize(FragmentNormal),1.0); outColor=texture(TextureColor,FragmentTexCoord); } diff --git a/src/RenderDevice/Vulkan/VKRenderTarget.cpp b/src/RenderDevice/Vulkan/VKRenderTarget.cpp index 1cafd3e3..38a7dc8d 100644 --- a/src/RenderDevice/Vulkan/VKRenderTarget.cpp +++ b/src/RenderDevice/Vulkan/VKRenderTarget.cpp @@ -86,7 +86,7 @@ bool SubmitQueue::Submit(const VkCommandBuffer *cmd_buf,const uint32_t cb_count, return(result==VK_SUCCESS); } - + bool SubmitQueue::Submit(const VkCommandBuffer &cmd_buf,vulkan::Semaphore *wait_sem,vulkan::Semaphore *complete_sem) { return Submit(&cmd_buf,1,wait_sem,complete_sem); @@ -149,9 +149,9 @@ bool SwapchainRenderTarget::PresentBackbuffer(vulkan::Semaphore *render_complete { VkSemaphore sem=*render_complete_semaphore; - present_info.waitSemaphoreCount=1; - present_info.pWaitSemaphores=&sem; - present_info.pImageIndices=¤t_frame; + present_info.waitSemaphoreCount =1; + present_info.pWaitSemaphores =&sem; + present_info.pImageIndices =¤t_frame; VkResult result=vkQueuePresentKHR(queue,&present_info);