Player's Pixelated Shadow Script v0.1 | Pixelated Shadows

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


Performance Showcase


39 Likes

Looks cool im gonna try it out, im wondering how did you actually do this?
Uh its not public or something?
I get an error screen

lots and lots of raycasting + the direction of the sun + methods of optimization that I have no clue how I came up with

2 Likes

whoops didn’t expect someone to try and test it out so soon. should be available now

1 Like

Yeah lol im always active and looking at new/latest so i see/reply to new topics quickly if i want to reply

2 Likes

This looks insane i genuinely have no idea how you did this but this is one of the most creative posts i’ve seen on the forums. Keep up the great work!

2 Likes

This should be a built in option with lighting rn, if minecraft can do it so can roblox

2 Likes

gimmick project with the possibility of being used in super niche thingamajig

2 Likes

this looks super sick dude! i cant wait to read through what you did to make this. this is very unique!

1 Like

saw this on twitter glad to see it get a public release

2 Likes

I will try it out!

1 Like

super duper truth nuke

(extra characters)