[Closed] Combination of TiledLighting and LightChannel settings may cause an issue
This issue occurs in vanilla UE4.12.5, as well.
When placing a SpotLight with the LightChannel setting being modified and an object that could be affected by the channel, and then executing TiledLighting, the light affects even another object with no relevant LightChannel.
In the above image, the SpotLight has been set so that it only affects the ball. (The ball, however, is not lighted because it's placed outside the range of the SpotLight.)
For the SpotLight, the "Cast Shadow" box is checked off. With that, I switch to TiledDeferred, using the following command:
Then, the object with no relevant LightChannel is affected by the light as shown above.
Also, if clipping the ball out of the screen, the light will no longer affect the object.
I would like to provide [a sample project] that can be run in standard UE4.12.5. You can confirm the issue on the editor without having to play it.
I'd appreciate it if you could confirm this.
The question has been closed Sep 22 '16 at 06:29 PM by AndrewHurley for the following reason:
The question is answered, right answer was accepted
Hi Masahiro, thanks for reporting this issue.
Currently lighting channels are not supported with tiled lighting.
It may be possible to add that feature yourselves if you're happy working with rendering code and shaders. The main implementation for tiled lighting is in TiledDeferredLightShaders.usf, and the CPP implementation for that is in TiledDeferredLightRendering.cpp.
The implementation for lighting channels for non-tiled lights is in DeferredLightPixelShaders.usf. The important code is this:
The GetLightingChannelMask function reads from the Texture2D LightingChannelsTexture. You would need to pass that in, and importantly you'd need to pass in the LightingChannelMask as part of the per-light data which is passed into the TiledDeferred uniformbuffer.
answered Sep 22 '16 at 06:28 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here