Substituting and distributing yields the following equation. The collection of these coefficients, L', provides the optimal approximation for function L(s) with the basis functions Y(s). Using spherical basis functions, such as spherical harmonics, the following equation approximates the lighting environment.Īn integer that sums over the number of basis functions. The variable that integrates over the sphere. s), 0) where Nₚ is the surface normal at point p.It is 1 if the point can see the light, 0 if not. The lighting environment (source radiance).Ī binary visibility function for point p. Evaluated at every vertex on the mesh.Ī constant, used as an energy conservation normalization factor. To start off, the following equation is the general equation to calculate exit radiance resulting from direct lighting on a diffuse object with arbitrary distant lighting. To fully understand a shader that implements PRT, it is useful to derive the formula the shader uses to calculate exit radiance.
0 Comments
Leave a Reply. |