|
|
|
|
|
|
|
|
|
|
while (i <= last && lightData.lightType == GPULIGHTTYPE_LINE) |
|
|
|
{ |
|
|
|
DirectLighting lighting = EvaluateBSDF_Line(context, V, posInput, preLightData, lightData, bsdfData, bakeLightingData); |
|
|
|
lightData.lightType = GPULIGHTTYPE_LINE; // Enforce constant propagation |
|
|
|
|
|
|
|
DirectLighting lighting = EvaluateBSDF_Area(context, V, posInput, preLightData, lightData, bsdfData, bakeLightingData); |
|
|
|
AccumulateDirectLighting(lighting, aggregateLighting); |
|
|
|
|
|
|
|
lightData = FetchLight(lightStart, min(++i, last)); |
|
|
|
|
|
|
{ |
|
|
|
DirectLighting lighting = EvaluateBSDF_Rect(context, V, posInput, preLightData, lightData, bsdfData, bakeLightingData); |
|
|
|
lightData.lightType = GPULIGHTTYPE_RECTANGLE; // Enforce constant propagation |
|
|
|
|
|
|
|
DirectLighting lighting = EvaluateBSDF_Area(context, V, posInput, preLightData, lightData, bsdfData, bakeLightingData); |
|
|
|
AccumulateDirectLighting(lighting, aggregateLighting); |
|
|
|
|
|
|
|
lightData = FetchLight(lightStart, min(++i, last)); |
|
|
|