What is this?
This is a local client sided script that adds pixelated shadows to your workspace using raycasting and the direction of the sun.
Should I use it for my main game?
Haha, nope. But it looks awesome (performance is all over the place) and I can’t stop you if you really want to. It’s an early work in progress that I’ll update over time if more people are interested.
How well does it run?
Usually depends on the type of settings that you decide to use for the shadows. I’ve added two different modes of frames that can be used which is Part Shadow Mode (PSM) and Frame Shadow Mode (FSM) each with it’s own set of pros and cons. As well as three different forms of optimization that can help boost performance with each one having different effects on the shadows appearance.
What are it’s limitations?
Currently performance is dependent on how big the grid is and how many times the shadow updates per frame. However apart from performance there’s depth limitations with the FSM as it’s a single part with frames on the surface. A fix for this could be to have a sort of greedy meshing technique dependent on the axis of the hit rays but that’s a bit above my technical scope. There’s also Shadow Layers which allow for shadow softening to give a less jagged effect at a small cost in performance which is not too noticeable.
PSM is better than FSM when it comes to depth FSM currently the Part that holds the UI Frames is dictated by a raycast pointing down from the root which means that if other parts are having their shadow cast they’ll be floating if the ray is hitting above their height level. PSM is made of independent parts which comes a bit at a performance cost but with the right optimized settings it can run nearly the same speed as PSM but not quite all the way.
Will you add X and so and so?
Maybe. I did this script during my off time and university is getting in the way so I’ll update this script whenever I can. I’ll post any update on my social account so if you’re interested in my work give me a follow.
Can I edit/use your script?
Sure. Just give credit to me and if a better method is discovered with this as the base make sure to credit the other programmers as well if you use their versions.
Feedback and suggestions welcomed
Suggestions are welcomed! I know that parallel luau may or may not help but I’d like to hear what you all think of my script.
Script Link
Set this up by placing this script in StarterCharacterScripts and changing the settings to your liking.
https://create.roblox.com/store/asset/104093964486147/Players-Pixelated-Shadow-Script-v01
Extras
