- Home /
Custom Shadow Effects
I'm trying to create a dark comic book shader and so far I've been able to create the effect I want using the Shader Graph by calculating the direction of the light and creating a "shadow" on the dark side of the object.
However, this isn't an actual shadow. And when other objects cast shadows they cast standard unity shadows that look out of place, especially when the default shadow is cast on an object with my custom shader.
Is there a way to create shadows with a custom pattern, like a halftone effect using the Voronoi function? Preferably in the shader graph or an equivalent?
Answer by Robotinator · Mar 23, 2021 at 09:03 AM
hi, sorry for a bit late of a response but here is how i get shadows
Create a custom function, follow this link and put it in it and create 2 vector 3 outputs, one named colour and the other named direction. then one verctor1 output name attenuation. Name the function GetLightingInformation. then get a normal vector and use a dot product to combine them. that's basically how you get lighting information
and if you dont $$anonymous$$d me asking, how do you get that effect. im trying to get one my self
Hey sorry for replying a year later. In essence the way I did it was by creating a poka dot pattern from voroni and multiplying it by the fraction node to get stripes that kinda looks like pencil lines. Then I looked up some cel shaders on youtube and used the line patters as the shadow in the cel shader. I then duplicated the cel shader nodes and added it to the line cel shader except the second one didn't have voroni lines but the normal solid colour. I needed this to give it he full shadow look in the center because the voroni lines wouldn't be wide enough ans would just look like separated lines next to each other
@Creationary How do you make this? I really want to add something similar for my game! :))
Your answer
Follow this Question
Related Questions
Fade-In/Out shadows for a specific object 0 Answers
I need swaying, self-shadowing, ultra-realistic grass 0 Answers
Want shadows from a semi-transparent receiver 0 Answers
Toon shader light culling shadow issue 0 Answers
Receive Shadows with Custom Vertex Shader & Shadow Passes Functioning Incorrectly 1 Answer