How to render normal to render target?

Hi, I am trying to use normal map for convolution to do outline but stuck at the first step…
My question would be is that possible to render the normal of the whole scene to a render target? Just like geting normal in gbuffers of unreal engine

Hello and welcome to the Babylon community!

This is possible, yes. There already is a ready NormalMaterial: Normal Material | Babylon.js Documentation (babylonjs.com), and you can tell the RenderTargetTexture to render with this material: RenderTargetTexture | Babylon.js Documentation (babylonjs.com)

3 Likes

Amazing! you guys really have some many treasure api for me to explore!

2 Likes

@PirateJC will be very happy with the trasure comparison! :rofl:

1 Like

Treasure Chest GIF by Escape Hunt UK

1 Like