How to sample normals in EEVEE?

Hey folks! I’m writing a custom shader code for EEVEE, and trying to get the normals of adjacent pixels in a material shader. (gpu_shader_material_something.glsl) Is there a view space normal texture which I can sample in the material shader stage?

I found some shaders in effect stage are using “normalBuffer” uniform, but I don’t know how to use that in material shader code.

1 Like

I got there is no prepass for normal buffer!

I spoke to the main Eevee dev (Clément Foucault), and he confirmed that there is no way to do what you want.

However I guess your latest comment means that you managed to figure that out as well.

2 Likes