+2 votes

I am working on a small game where most of the world is unshaded to create a simple Untitled Goose Game-like art style. I am wondering if it is possible to make the player, seen in the pictures below, darken in the spots that are blocked from the directional light source.

The player in sunlight

I have tried some toon shaders and have experimented with writing my own shaders, but as you can see in the next image this results in ugly self-shadowing.

Any and all help on the matter would be greatly appreciated!

( I found THIS POST from a person a while back that seems to have solved this problem, but he never explained how )

in Engine by (14 points)

Did you try to add a pass to your material and uses "shadow to alpha" + blend mode to "mul"? Might be the way to go...

Thank you for your reply! I tried your solution and it works great for shadows cast from other meshes. But I am still having a problem with the player mesh casting ugly shadows upon itself... The only simple solution I can think of is if it is possible to make a shader ignore shadows from specific materials or nodes.

Any more advice would be awesome!

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.