Setps needed to recreate situation:CSceneManager.cpp
...
if(LightManager)
{
LightManager->OnRenderPassPreRender(CurrentRendertime);
}
else
{
// Sort the lights by distance from the camera
core::vector3df camWorldPos(0, 0, 0);
if(ActiveCamera)
camWorldPos = ActiveCamera->getAbsolutePosition();
core::array<DistanceNodeEntry> SortedLights;
SortedLights.set_used(LightList.size());
for(s32 light = (s32)LightList.size() - 1; light >= 0; --light)
SortedLights[light].setNodeAndDistanceFromPosition(LightList[light], camWorldPos);
SortedLights.set_sorted(false);
SortedLights.sort();
for(s32 light = (s32)LightList.size() - 1; light >= 0; --light)
LightList[light] = static_cast<ILightSceneNode*>(SortedLights[light].Node);
}
...
1. Create 2 dynamic lights (irrlicht shaders support only 2 lights so we need 2 only)
2. Create any mesh and set its MaterialType to NormalMap or ParallaxMap or any other Type which uses getDynamicLight method
3. Add any animator to your lights
What do i mean:
I mean that when your lights are moving they are sorted by their distance to a camera and it wents to a different LightList place (0,1,2...) each time one light get closer or farther to camera than other lights. In the effect the lights will flicker because of change their list index.
The more lights you use the worse it works. More flickering.
This situation doesn't happen with 1 light or static lights.
My question is:
Is that a bug or it should work that way ?
It can be easly fixed by adding LightManager to scene so im just asking.
@thx