Skip to content

Commit f82099d

Browse files
Tutorial 21: fixed Vulkan validation warning about image format mismatch
1 parent ea4f4ca commit f82099d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Tutorials/Tutorial21_RayTracing/assets/RayTrace.rgen

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
#include "structures.fxh"
33
#include "RayUtils.fxh"
44

5-
RWTexture2D<float4> g_ColorBuffer;
5+
#ifdef VULKAN
6+
# define VK_IMAGE_FORMAT_RGBA8 [[vk::image_format("rgba8")]]
7+
#else
8+
# define VK_IMAGE_FORMAT_RGBA8
9+
#endif
10+
11+
VK_IMAGE_FORMAT_RGBA8 RWTexture2D<float4> g_ColorBuffer;
612

713
[shader("raygeneration")]
814
void main()

0 commit comments

Comments
 (0)