Hey
I’m trying to make an outline shader like the one described here https://alexanderameye.github.io/edgedetection but it seems like there’s no way to get the camera normals into shader graph or anywhere else for that matter.
Is that correct?
Is there an alternative way to get to screen space normals?
nope. urp does not render out normals. only depth and color if you set it up properly.
well that is disappointing, and there’s no workaround/hack?
1 Like
you can “approximate normals” by reconstructing the worldposition of the depth buffer sample.
then use cross( ddy(wpos), ddx(wpos) ) to get the normal. this normal will represent the actual geometry. it won’t be smoothed. so you will get some flat shaded style.
Hey thanks, that took me a little step closer to destination outlines ![]()
That will not work on GLES2 devices.