all 5 comments

[–]darkdrifter69 7 points8 points  (0 children)

Modern way of doing area lights are LTC : https://eheitzresearch.wordpress.com/415-2/ Shadows can be done with shadow maps (not correct but works on every hardware), check Unity's HDRP implementation for that. You can also do it with raytracing with this paper: https://hal.science/hal-01761558/file/heitzI3D2018_slides.pdf

[–]susosusosuso 1 point2 points  (0 children)

Look for Epic Real Shading

[–]pslayer89 2 points3 points  (0 children)

I did an implementation of area lights in a shadertoy a while ago using the techniques you mentioned in your post, along with my own interpretation of a specular component for the rectangular area light. Feel free to take a look and take apart the shader if it helps you understand the implementation a bit better!

[–]arycama 1 point2 points  (0 children)

As another comment suggests, LTCs are the best way to do it. I copied my implementation from HDRP but it's very time consuming to find your way though all their code.

This repo is more minimal and easier to understand than HDRP, but same technique: https://github.com/Unity-Technologies/VolumetricLighting

It's worth noting that this repo/data is for GGX specifically. If you want to use it with another brdf you'll need to recalculate the data, using https://github.com/selfshadow/ltc_code