Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float3 refl = reflect(e, n);
- float dist = length(L.xyz);
- float3 l = normalize(L.xyz);
- float attn = 1.0 / (1.0 + 1.0 / 30 * dist + 1.0 / 700 * dist * dist);
- d += saturate(dot(n,l)) * gLightColor[i].xyz * attn.xxx;
- s += pow(saturate(dot(-refl, l)), power) * gLightColor[i].xyz;
Add Comment
Please, Sign In to add comment