Need help finding light attenuation code for deferred rendering!

Hey all, need some of your grand knowledge to be bestowed upon me for this next question. I am currently working with some interesting stuff that Tom Looman found/used in his Disney Facilier effect forum post, which you can see here:

What i need to find, however, is the equivalent of some code that he used, but able to be used in deferred rendering.

The code he used is " return Square(Texture2DSampleLevel(LightAttenuationTexture, LightAttenuationTextureSampler, UV, 0)); " which is found in the engine’s shader folder at …/4.14/Engine/Shaders/Common.usf and contains the function GetPerPixelLightAttenuation(float2 UV);

The problem with that, however, is that the code only works with forward rendering enabled. I don’t really understand or know the difference between forward and deferred rendering, but I have heard that deferred is more versatile/better/less limited and I would really like to not cripple my project right from the get go. So if anyone knows how to get the equivalent of that code to work with deferred rendering, I would be very appreciative.

For reference, when plugging the output of that code (when used in a custom node) into the emissive of a material, the output is the image below:

In the forward renderer, shadows are computed before the base pass and passed in via LightAttenuationTexture, which is why his modification works. In the deferred renderer, shadowing is computed later and not available in the base pass.

So there is no way to blend color betweeen shadowed and unshadowed zones in a material?

Nope. Only shady workarounds. You should roll your own shading model or modify existing standard shading for the effect.

So, what’s the shady workaround?