Hi,
I’m working on an effect which adds a glow effect to the centre of an object. However, I’m having difficulty correctly getting the glow to appear at the object centre. It seems like there is an issue with how I’m doing my world to view-space transformations, but I haven’t managed to find a solution so far, so I could use some help.
Edit: In the pictures below I used spheres, but this also needs to work on objects with flat surfaces, such as a cube, so a simple Fresnel would not work.
This is what I have currently. Notice that the white glow is not centred correctly in objects that are not at the centre of view.
Shader graph (URP):
This is a mock-up of what I’m trying to achieve. The glow should appear at the object centre regardless of where it’s viewed from.
I’m using Unity version 2020.1.0f1 and shader graph version 8.2.0.
Thank you.