Files
Divergent/mods/Body Health System Realistic Overhaul/gamedata/shaders/r2/model_exohealth.ps
T
Rage 255081e1ee Added New Mods; Swapped Mods and Removed Some
Removed EGUI in favor of UI Rework by Sota

Added in GTR Optimized for higher res textures, over Zone Reality Remade and removed all files that conflicted from ZRR to save storage space.
2024-03-30 06:43:01 -04:00

47 lines
1.1 KiB
PostScript

#include "common.h"
struct v2p
{
float2 tc0: TEXCOORD0; // base
half3 tc1: TEXCOORD1; // environment
half4 c0: COLOR0; // sun.(fog*fog)
};
// Pixel
uniform float4 m_actor_params;
uniform float4 m_affects;
half get_noise(float2 co)
{
return (frac(sin(dot(co.xy ,float2(12.9898,78.233))) * 43758.5453))*0.5;
};
half4 main( v2p I ): COLOR
{
// øèðîêàÿ ïîëîñêà èñêàæåíèé
half problems = cos( ( frac( timers.z * 4 ) - 0.5 ) * 3.1416 )*2 - 0.8;
half AMPL = 0.3;
I.tc0.y -= ( m_affects.x > 0.15 && I.tc0.x > problems-AMPL && I.tc0.x < problems+AMPL) ? cos(4.71*(I.tc0.x-problems)/AMPL) * sin( frac(timers.z)*6.2831*90 ) * (m_affects.x/10) * (AMPL-abs(I.tc0.x-problems))/AMPL : 0;
half4 t_base = tex2D (s_base, I.tc0);
half tmp = 1-m_actor_params.y;
tmp = clamp(tmp, 0, 0.5);
t_base.r +=tmp*t_base.a;
tmp = 0.5-abs(m_actor_params.y-0.5);
tmp = clamp(tmp, 0, 0.5);
t_base.g +=tmp*t_base.a;
// Øóì ïðè âûáðîñå
half noise = get_noise(I.tc0*timers.z) * m_affects.x * 2;
t_base.r += noise;
t_base.g += noise;
t_base.b += noise;
return half4 (t_base.r, t_base.g, t_base.b, 1);
}