#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); }