Calculates diffuse and specular contribution from the area light, given a 2D random sample point representing a location on the surface of the light
| 163 | // Calculates diffuse and specular contribution from the area light, given a 2D random sample point |
| 164 | // representing a location on the surface of the light |
| 165 | Float3 SampleAreaLight(const Float3& position, const Float3& normal, RTCScene scene, |
| 166 | const Float3& diffuseAlbedo, const Float3& cameraPos, |
| 167 | bool includeSpecular, Float3 specAlbedo, float roughness, |
| 168 | float u1, float u2, Float3& irradiance) |
| 169 | { |
| 170 | Float3 lightPos = Float3(AppSettings::AreaLightX, AppSettings::AreaLightY, AppSettings::AreaLightZ); |
| 171 | return SampleSphericalAreaLight(position, normal, scene, diffuseAlbedo, cameraPos, includeSpecular, |
| 172 | specAlbedo, roughness, u1, u2, AppSettings::AreaLightSize, |
| 173 | lightPos, AppSettings::AreaLightColor.Value() * FP16Scale, irradiance); |
| 174 | } |
| 175 | |
| 176 | // Checks to see if a ray intersects with the area light |
| 177 | static float AreaLightIntersection(const Float3& rayStart, const Float3& rayDir, float tStart, float tEnd) |
no test coverage detected