How to implement hatching shader without proper access to fragment brightness?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sonovice

I would like to implement this hatching shader:

example

AFAIU I need access to brightness values in the fragment shader after using some sort of diffuse shader. Getting values from “LIGHT” only works in its respective shader, so I’m pretty out of ideas. Maybe an impossible case for Godot (for now)?