If you have a scene with any amount of objects casting shadows (in my example scene, this was 66 parts including the baseplate and SpawnLocation), and an invisible, CastShadow = false
part moving to-and-fro a distant location, it causes the lighting to visibly flicker each time you move the part far away. This is fully consistent and occurs on many different PC specs, both in-game and in studio. Below is a video plus a minimal reproduction file which shows this behavior:
(mild epilepsy warning)
Shadow_bug.rbxl (54.4 KB)
If you do not see the issue occuring, try moving your camera around, or add more parts with shadows into the scene.
There is a script in StarterPlayerScripts which moves the invisible part:
local part = workspace:WaitForChild("Part")
local FAR_AWAY_CFRAME = CFrame.new(9e9, 9e9, 9e9)
local originalCFrame = part.CFrame
while true do
part.CFrame = FAR_AWAY_CFRAME
task.wait()
part.CFrame = originalCFrame
task.wait()
end
This behavior is something that I, and many other developers, widely use when implementing part caches. Parts which are no longer needed are moved far, far away so that they are no longer rendered, and then moved back into the scene when implementing e.g. visual effects.
All settings in Workspace are set to Default.
Expected behavior
I would expect no flickering with the shadows to occur, especially so given when the part is completely invisible, has CastShadow and collisions off, thus having no impact on the scene.