Skip to content
Snippets Groups Projects
Commit c086f06b authored by Tofu Linden's avatar Tofu Linden
Browse files

cheaper, cuter way to deal with spot vs point in the shader

parent c67c7ddd
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ float calcPointLight2(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_omnid
float da = clamp(1.0/(la * d), 0.0, 1.0);
//angular attenuation
da *= clamp(dot(-ln, lv)+is_omnidirectional, 0.0, 1.0) * calcDirectionalLight(n, lv);
da *= max(dot(-ln, lv),is_omnidirectional) * calcDirectionalLight(n, lv);
return da;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment