What’s happening
I’ve noticed recently that upon running intense calculations inside of a RunService RenderStepped / BindToRenderStepped, the lighting shadows from ShadowMap or Future flicker intensely. This is not a problem as far as i can tell for voxel or compatability. This is a very serious issue for me as it completely ruins the user experience and the level design.
This shouldn’t be happening as I’m pretty sure the code I am running is not that intensive to the extent that the lighting engine skips shadow frames.
It seems to be most common when using raycasting calculations as in my game there is a weapon that uses raycasts every frame, and this issue used to only occur when that weapon was being used. Now i fire raycasts every frame regardless to check for wall obstructions and the issue happens a lot more frequently.
Platforms
This issue happens in both Studio and Player, including Windows 10 version and the android app. This is not a graphics driver issue as I updated my drivers earlier and the issue still persists. This happens on both my desktop and my laptop as well so I believe it to be engine-side.
Place link
Here is the affected place:
https://www.roblox.com/games/9522786121/test
To reproduce, make sure you are in first person, go to the very dark shadow (see video) and hold right click on the mouse.
Video of Problem
Here is a video showing the problem. Please be aware the video contains very rapid flashing lights so please do not watch if prone to seizures or you have epilepsy:
- Note: i have removed the video after seeing this being looked into as i noticed just now it accidentally revealed some personal information. sorry!
This started happening as soon as i added raycast calculations into my renderstepped code. I don’t know when that was exactly but i think was within the last 2 weeks Please note that when I comment out the raycast calls this still happens, so it is not solely caused by raycasting!
I am using an Intel I7 9700k with NVIDIA RTX 2060Super but this seems to be engine specific, not device.
Please let me know if this can be solved!
Thanks!
EDIT: Please go to the script WeaponsAndArms
in StarterCharacterScripts and go to line 446 to see the affected runservice binding.