So after reading https://www.guerrilla-games.com/read/killzone-shadow-fall-creating-art-tools-for-a-new-generation (a guerilla games presentation on PBR) I noticed the Area lights as opposed to the standard Directional, Point & Spot lights in DirectX can produce very realistic shadows.

Now a lot of the resources online talk about it and what it is but there's not much regarding implementation. Some websites online say that it is just an array of lights but I don't think that's what it is.

Can somebody explain how I can implement this (and maybe with some code). If you could include any links to some good resources regarding implementation that would be great aswell.

  • \$\begingroup\$ It's not particularly hard to implement it, instead of calculating the distance from a point, you simply calculate it from the rectangle \$\endgroup\$ – Bálint Oct 15 '16 at 18:56
  • \$\begingroup\$ BTW, I'm not sure if I want to look trough each 118 images to see what you're trying to achieve \$\endgroup\$ – Bálint Oct 15 '16 at 19:00
  • \$\begingroup\$ Is it really that simple? I've read the chapter in gpu pro 5 on it (but still no implementation details) & a few other publications but I'm still a little puzzled. Could you post some code on it? \$\endgroup\$ – Arjan Singh Oct 16 '16 at 5:26
  • \$\begingroup\$ Nope. Look at resources about point-rectangle distance. \$\endgroup\$ – Bálint Oct 16 '16 at 7:43
  • \$\begingroup\$ So if I currently use float3 lightVec = L.Position - pos; for a point light, in order to calculate it from a rectangle what do I do? I'm just really confused on how I should do it for a rectangle. \$\endgroup\$ – Arjan Singh Oct 16 '16 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.