ForwardLocalLightBuffer in LightGridCommon


I need your help in the file LightGridCommon.ush

I’m trying to customize the light component by adding some stuff in it and in the forward rendering, i need to change thos file.
I need to add my custom new line in this :

FLocalLightData GetLocalLightData(uint GridIndex, uint EyeIndex)
FLocalLightData Result;

if (EyeIndex == 0)
uint LocalLightIndex = CulledLightDataGrid[GridIndex];
uint LocalLightBaseIndex = LocalLightIndex * LOCAL_LIGHT_DATA_STRIDE;
Result.LightPositionAndInvRadius = asfloat(ForwardLocalLightBuffer[LocalLightBaseIndex + 0]);
Result.LightColorAndFalloffExponent = asfloat(ForwardLocalLightBuffer[LocalLightBaseIndex + 1]);
Result.LightDirection = asfloat(ForwardLocalLightBuffer[LocalLightBaseIndex + 2].xyz);
Result.ShadowMask = ForwardLocalLightBuffer[LocalLightBaseIndex + 2].w;
Result.SpotAngles = asfloat(ForwardLocalLightBuffer[LocalLightBaseIndex + 3].xyz);
Result.SourceRadiusPacked = ForwardLocalLightBuffer[LocalLightBaseIndex + 3].w;
Result.LightTangentAndSoftSourceRadius = asfloat(ForwardLocalLightBuffer[LocalLightBaseIndex + 4]);

return Result;

Where asfloat(ForwardLocalLightBuffer[LocalLightBaseIndex + 0]); get the value in the .cpp or .h ?
I found it in the BasePassRendering.h but i can’t find anything with the Index +0 or Index +1 …

The Idea here is adding a boolean in the result to play with it in the light system

Thank you :slight_smile:

I really need your help for this.

I’m sorry to Bup it but i really need some help.
Thank you very much !