Screen Space Curvature Shader

I’m interested to have a Screen Space Curvature Shader (like in Blender for viewport display) in GHGL for GH. I’ve found code (Screen Space Curvature Shader - Made by Evan), but copying it into the “Fragment”-Tab of the GH GLShader editor gave no results. I’ve no idea how to adapt the code to run succesfully, poking around in the code didn’t help.
ghgl_Screen Space Curvature (8.0 KB)
Any help welcome.


Good idea!

Here an image (Screen Space Curvature for better surface detail visualization (+implementation details) - #5 by Moniewski - Feature Request - Nomad Sculpt) for reference:

Here the Blender implementation: blender/workbench_curvature_lib.glsl at main - blender - Blender Projects
workbench_curvature_lib.glsl.txt (1.8 KB)