This commit is contained in:
Vasily Petrov 2026-06-18 01:18:29 +03:00
commit 2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions

View file

@ -0,0 +1,31 @@
#include "common.hlsli"
#include "pnv.hlsli"
uniform float4 m_hud_params;
struct v2p
{
float2 tc0: TEXCOORD0;
float3 tc1: TEXCOORD1;
float4 c0: COLOR0;
};
float4 main(v2p I, float4 pos2d : SV_POSITION) : SV_Target
{
if (m_hud_params.y * m_hud_params.a < 0.0001f) {
return 0.0f;
}
float4 t_base = s_base.Sample(smp_base, I.tc0);
t_base.xyz = detonemap(t_base.xyz);
float4 t_vp2 = s_image[pos2d.xy];
t_vp2.xyz = calc_night_vision_effect(I.tc0, t_vp2, float3(1.0, 2.0, 1.0));
float alpha = m_hud_params.y * m_hud_params.a;
t_vp2 *= saturate(alpha * 2.0f - 1.0f);
float3 final = lerp(t_vp2.xyz, t_base.xyz, t_base.a);
return float4(final.xyz, saturate(alpha * 2.0f));
}