Convert fov to radians when computing pixel cone.

Fixes #167. Textures are still blurry when viewed at an angle as
UVDerivsFromRayCone does not take anisotropy into account.
This commit is contained in:
Anton Baskanov 2021-11-04 23:37:44 +07:00 committed by Ivan Avdeev
parent 36cf2146da
commit 3f70032e77
1 changed files with 1 additions and 1 deletions

View File

@ -669,7 +669,7 @@ static qboolean rayTrace( VkCommandBuffer cmdbuf, VkImage frame_dst, float fov_a
.random_seed = (uint32_t)gEngine.COM_RandomLong(0, INT32_MAX),
.bounces = vk_rtx_bounces->value,
.prev_frame_blend_factor = vk_rtx_prev_frame_blend_factor->value,
.pixel_cone_spread_angle = atanf((2.0f*tanf(fov_angle_y * 0.5f)) / (float)FRAME_HEIGHT),
.pixel_cone_spread_angle = atanf((2.0f*tanf(DEG2RAD(fov_angle_y) * 0.5f)) / (float)FRAME_HEIGHT),
.debug_light_index_begin = (uint32_t)(vk_rtx_light_begin->value),
.debug_light_index_end = (uint32_t)(vk_rtx_light_end->value),
.flags = r_lightmap->value ? PUSH_FLAG_LIGHTMAP_ONLY : 0,