For rendering an indoor scene where light source is skylight coming in through the window opening, one can consider the window polyline as the light source, with the sky distribution, in direct lighting calculation. And sample the window area(or solid angle).
It works as long as it's just an opening. Once a glazing is introduced I cannot figure out how to do direct lighting(in a path tracer) correctly. Shadow rays either are transmitted or reflected. I guess the transmitted ray needs to be traced again but this is not easy I suppose(as the the Brdf.SampleDirection method returns only direction), considering also that it might be a double glazing which inter-reflection can happen too.
Does any one have any suggestion or experience on this? Thanks,