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

11 lines
305 B
HLSL

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