e4s-sdk/gamedata/shaders/r2/accum_sun_mask.ps
2026-06-17 23:06:51 +03:00

10 lines
309 B
PostScript

#include "common.h"
#define EPS (0.9f/255.f)
half4 main ( p_screen I ) : COLOR
{
// Sample the fat framebuffer:
half4 NH = tex2D (s_normal, I.tc0);
half L = NH.w * dot (Ldynamic_dir, (half3)NH) + EPS; // Use hemisphere as approximation of max light
return half4 (L,L,L,L);
}