knightcrawler25/GLSL-PathTracer

scene file light format

vtushevskiy opened this issue · 1 comments

How do you define quad lights in .scene file? There is position, v1, v2 parameters.
Is 'position' a coordinates of the center of light? What are 'v1' and 'v2' vectors?
UPDATE
I think position, v1, v2 are just coordinates of the first three vertices of area light, right?

position, v1 and v2 are the 3 vertices that define a quad like so:

image

Internally, u and v are calculated as v1 - position and v2 - position and cross product of u and v determines the emission side or the normal of the light