/** * @ Version: SCREEN SPACE SHADERS - UPDATE 21 * @ Description: SSR - Combine Phase * @ Modified time: 2024-06-03 07:49 * @ Author: https://www.moddb.com/members/ascii1457 * @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders */ #include "screenspace_common.h" uniform float4 ssr_setup; // x: SSR Resolution | y: Blur Intensity Texture2D ssr_image; Texture2D s_gloss_data; float4 main(p_screen I) : SV_Target { // SSR Gloss Buffer float4 GlossData = s_gloss_data.Sample( smp_nofilter, I.tc0 ); // Sample SSR float4 ssr = ssr_image.SampleLevel(smp_linear, I.tc0 * (1.0 / ssr_setup.x), 0).rgba; // Sample Color buffer float3 color = SSFX_get_image(I.tc0, 0); // Scene + SSR return float4(lerp(color, ssr.rgb, GlossData.w), 1.0f); }