From cf0c88bc08258f05ce6308e36809a06af4d82363 Mon Sep 17 00:00:00 2001 From: NightFox <0x4E69676874466F78@users.noreply.github.com> Date: Sun, 26 Dec 2021 04:19:39 +0300 Subject: [PATCH] flashlight tuning for classic render --- ref_vk/vk_render.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ref_vk/vk_render.c b/ref_vk/vk_render.c index 3b88cbbf..393ea8f1 100644 --- a/ref_vk/vk_render.c +++ b/ref_vk/vk_render.c @@ -564,7 +564,7 @@ static uint32_t writeDlightsToUBO( void ) vec3_t forward, view_ofs; vec3_t vecSrc, vecEnd; float falloff; - trace = gEngine.EV_VisTraceLine( vecSrc, vecEnd, PM_STUDIO_BOX ); + trace = gEngine.EV_VisTraceLine( vecSrc, vecEnd, PM_NORMAL ); // compute falloff falloff = trace->fraction * FLASHLIGHT_DISTANCE; if( falloff < 500.0f ) falloff = 1.0f; @@ -580,14 +580,14 @@ static uint32_t writeDlightsToUBO( void ) } VectorAdd( entPlayer->origin, view_ofs, vecSrc ); VectorMA( vecSrc, FLASHLIGHT_DISTANCE, forward, vecEnd ); - trace = gEngine.EV_VisTraceLine( vecSrc, vecEnd, PM_STUDIO_BOX ); - VectorMA( trace->endpos, -30, forward, l->origin ); + trace = gEngine.EV_VisTraceLine( vecSrc, vecEnd, PM_NORMAL ); + VectorMA( trace->endpos, -10, forward, l->origin ); // apply brigthness to dlight l->color.r = bound( 0, falloff * 255, 255 ); l->color.g = bound( 0, falloff * 255, 255 ); l->color.b = bound( 0, falloff * 255, 255 ); - l->radius = 60; + l->radius = 75; Vector4Set( ubo_lights->light[num_lights].color,