Been having a blast with the node material editor since I’ve finally started to understand some of the shader magic… Currently trying to recreate and understand this Brackeys tutorial for Unity: FORCE FIELD in Unity - SHADER GRAPH - YouTube
However, I’m having some difficulties undestanding some aspects of the tutorial and how to translate those into Babylon NME.
For example, I’m not sure how to translate these into NME nodes and what they are actually… Anyone has any ideas?
Here are my playground and nme so far, both look pretty awful
Also I am wondering if I am missing some setting that would be critical on this shader? If anyone has any idea where to go from here, I would be super happy Mainly interested on the ‘intersection’ part of the tutorial, to achieve this kind of effect:
Here’s how you can achieve the intersection effect:
The scene depth renderer does support generating depth in camera space, but the option is not available in the NME, that’s why I have created it “by hand” in the code (lines 35/36). I will make a PR tomorrow to better support it.
With the scene depth in camera space, it’s easy to implement the same thing than in Unity: the difference is that the camera space z coordinate of the current point is in 1/FragCoord.w instead of ScreenPosition.w like in Unity.