# How to properly direct light sample GGX in path tracing

I have been trying to implement the GGX shader in my path tracer based on this paper: Microfacet Models for Refraction through Rough Surfaces It's pretty clear how the importance sampling works, but I would also like to do next event estimation (direct lighting) for when the object is more rough and acts close to a diffuse shader.

The part that is really confusing to me is equation [19] and [20]:

I don't understand why in [19] they use the microsurface normal, but in [20] they use the macrosurface normal. The transmission term I don't need because I'm just working on the reflectance, but I still don't get why it's m on [19] and n on [20]. Is it possible to use any incident direction and outgoing direction and get back a proper BRDF? Or does the scatter direction "o" have to match where the microsurface normal makes it bounce to? In direct lighting the directions would need to be independent of each other for it to work since you're grabbing a from the hit point to the light, and from the hit point to the camera.

This may simply be a typo or oversight. Note that in the previous section they've been discussing the microsurface BxDFs $f^m_r(\mathbf{i},\mathbf{o},\mathbf{m})$ and $f^m_t(\mathbf{i},\mathbf{o},\mathbf{m})$, which are naturally evaluated at a microsurface normal, but in this section they've moved on to talking about macrosurface BxDFs, which have the microsurface integrated out.
AFAICT, the intent of equation 19 is just to say that the total BSDF is a sum of reflection and transmission parts, so it doesn't really matter ($\mathbf{m}$ is a free variable there and could be named anything), but to be less confusing it should probably have been $\mathbf{n}$. Maybe they just forgot to update it during a round of edits, or something.