25 lines
679 B
PostScript
25 lines
679 B
PostScript
/**
|
|
* @ Version: SCREEN SPACE SHADERS - UPDATE 20
|
|
* @ Description: SSR - Combine Phase
|
|
* @ Modified time: 2024-02-09 07:25
|
|
* @ 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 | z: Temporal Intensity
|
|
|
|
Texture2D ssr_image;
|
|
|
|
float4 main(p_screen I) : SV_Target
|
|
{
|
|
// 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);
|
|
|
|
// Mix
|
|
return float4(lerp(color, ssr.rgb, ssr.a), 1.0f);
|
|
} |