I never implemented this but why this wouldn’t work:
- iterate through the light actors you need to keep track of in either C++ or Blueprints; capture what you need, likely it’s world-position and rotation?
- write those values into an MPC
- sample within your material; position and/or rotation ought to give you enough to calculate a vector for each pixel and whatever else you might (likely) need
My point here being that if you want to calculate light in a material, likely per-pixel, the the maths attached to that pixel need to be able to read the direction/vector of the light(s) in question. So unless you set them directly against a material (instance), an MPC seems the best, logical-choice since it’s performant, has a decent capacity, and is readily-accessible from any material/C++/BP.
It’s about knowing what X and Y need to know about one another, and how they can laterally share information.