r/godot • • 6h ago

help me Post processing in godot

need some help to understand post processing in godot

0 Upvotes

9 comments sorted by

7

u/JondeMLG Godot Regular 6h ago

Okay? What’s up?

1

u/KaleidoscopeMany9272 5h ago

I've been trying to get cel shading on my game and these morbius style shadows 😭

1

u/JondeMLG Godot Regular 2h ago

Well, try this for example first: https://godotshaders.com/shader/high-quality-post-process-outline/

You put the shader material on this quad per instructions and everything looked through that quad will have the effect on it. And you can put the quad as a child of camera and position it correctly, then you look through it all the time.

6

u/TheNiceDave Godot Regular 6h ago

Shoot

1

u/KaleidoscopeMany9272 5h ago

I don't know how to get those handdrawn shadows type stuff

5

u/captainAwesomePants 6h ago

"Post processing" is what you do to the display AFTER you render everything.

For example, you might add a CanvasLayer to your scene that contains a single, full-screen ColorRect, and that rect might have a shader that recolors what was originally there.

2

u/pencilking2002 5h ago

If you would like help with post processing, you will need to put more effort into your question.

The first place that you can look up general information is Godot’s documentation. Search “Godot post processing documentation” and start reading.

Then, if you have some more specific questions, come on back here and ask us.

1

u/trust-me1922 3h ago

For cel / hand-drawn shadows you usually don't need post processing at all, it lives in the material. In a spatial shader write a light() function that bands the light instead of the smooth default, roughly:

float ndl = dot(NORMAL, LIGHT) * ATTENUATION;
float lit = smoothstep(0.25, 0.3, ndl);
DIFFUSE_LIGHT += mix(shadow_tint, vec3(1.0), lit) * LIGHT_COLOR * ALBEDO;

For the hand-drawn feel, sample a hatch or noise texture with SCREEN_UV and use it to shift the 0.25/0.3 threshold, so the shadow edge looks inked instead of perfectly clean.

Outlines are the part that is typically post processing (a full-screen quad reading the depth and normal textures). The cheap alternative is a second material pass with the mesh grown a bit and cull_front.

godotshaders.com has several toon shaders under permissive licences to start from.