x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

ForwardLocalLightBuffer in LightGridCommon

Hello,

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

Product Version: UE 4.18
Tags:
more ▼

asked Mar 15 '18 at 02:34 PM in C++ Programming

avatar image

erodann
26 1 2 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello, I bump this question because i really need your help guys. Thank you.

more ▼

answered Mar 28 '18 at 09:12 AM

avatar image

erodann
26 1 2 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question