From 0627c612c3c1b7d6a7b30a8555b8e97439cd6de4 Mon Sep 17 00:00:00 2001 From: Ivan 'provod' Avdeev Date: Sun, 7 Nov 2021 10:11:14 -0800 Subject: [PATCH] rtx: s/rgba8/rgba16f/ for color textures --- ref_vk/shaders/denoiser.comp | 4 ++-- ref_vk/vk_rtx.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ref_vk/shaders/denoiser.comp b/ref_vk/shaders/denoiser.comp index ad5eb8ff..84ecfb74 100644 --- a/ref_vk/shaders/denoiser.comp +++ b/ref_vk/shaders/denoiser.comp @@ -2,8 +2,8 @@ layout(local_size_x = 16, local_size_y = 8, local_size_z = 1) in; -layout(set = 0, binding = 0, rgba8) uniform image2D source; -layout(set = 0, binding = 1, rgba8) uniform image2D dest; +layout(set = 0, binding = 0, rgba16f) uniform image2D source; +layout(set = 0, binding = 1, rgba16f) uniform image2D dest; // Blatantly copypasted from https://www.shadertoy.com/view/XsGfWV vec3 aces_tonemap(vec3 color){ diff --git a/ref_vk/vk_rtx.c b/ref_vk/vk_rtx.c index 9ca7c234..65f1b298 100644 --- a/ref_vk/vk_rtx.c +++ b/ref_vk/vk_rtx.c @@ -1138,7 +1138,7 @@ qboolean VK_RayInit( void ) createPipeline(); for (int i = 0; i < ARRAYSIZE(g_rtx.frames); ++i) { - g_rtx.frames[i] = VK_ImageCreate(FRAME_WIDTH, FRAME_HEIGHT, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_TILING_OPTIMAL, + g_rtx.frames[i] = VK_ImageCreate(FRAME_WIDTH, FRAME_HEIGHT, VK_FORMAT_R16G16B16A16_SFLOAT, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT); SET_DEBUG_NAMEF(g_rtx.frames[i].image, VK_OBJECT_TYPE_IMAGE, "rtx frame[%d]", i);