27 lines
637 B
PostScript
27 lines
637 B
PostScript
|
/**
|
||
|
* @ Version: SCREEN SPACE SHADERS - UPDATE 17
|
||
|
* @ Description: Blood Decal - Pixel Shader
|
||
|
* @ Modified time: 2023-07-06 12:28
|
||
|
* @ Author: https://www.moddb.com/members/ascii1457
|
||
|
* @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
|
||
|
*/
|
||
|
|
||
|
#include "common.h"
|
||
|
|
||
|
uniform float4 ssfx_blood_decals;
|
||
|
|
||
|
float4 main ( p_TL I ) : SV_Target
|
||
|
{
|
||
|
float4 res = s_base.Sample( smp_base, I.Tex0 );
|
||
|
|
||
|
// Color intensity
|
||
|
res.rgb *= ssfx_blood_decals.x;
|
||
|
|
||
|
// Alpha adjustments
|
||
|
res.a = saturate(res.a * 1.7f - 0.7f) * ssfx_blood_decals.y;
|
||
|
|
||
|
// Lifespan fade-out
|
||
|
res.a *= 1.0 - I.Color.a;
|
||
|
|
||
|
return float4(res.rgb, res.a);
|
||
|
}
|