Open GSterbrant opened 2 years ago
We could have a global switch (at least for the clustered lights) of the meaning of the cookie texture. It could be switched to a IES profiles meaning. This would make it very easy to implement, just a small part of the shader would work differently.
You'd just need to change how you sample the texture. Instead of doing all the heavy projection math, you can just use the angle between surface and the light to pick the IES value.
The way Frostbite engine added this is described in 4.5 Photometric lights https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
Description
Add support for IES light profiles:
These are essentially just weights you can use in a shader and lookup the value based on the angle between the view point and the light, and can be used to create lights which correspond much more to real-world lightbulbs.