my simple phong shader simulates a point light source with linear attenuation. this way i can have bright, intense lights when i set a large radius… but if i want them to have a small radius, they faint.
so my question is - how can i simulate a (point) light source that can have a small radius, but that’s still intense? in other words, how can i make the intensity of the light source independent from the light’s radius and the consequential attenuation?
ok here is my final shader - i still have two issuses, though:
the shader still seems to illuminate geometry that’s barely outside the light radius, i.e. the actual light radius is a big bigger than it should be. that sucks, as i’d like to cull this geometry.
in some cases, specular highlights appear in reverse color when the geometry is almost back-facing the light source.
any idea what’s wrong? and do you see other bugs/things that could be improved (besides the if-conditions and the extra texture lookup for highlights)? thanks!