NME Derivative Node Causing Compilation Error

Using a derivative node to distort UV’s and sampling a texture with those updated UV’s is causing a compilation error. If you view the UV’s directly they all appear to be valid and all compiles fine.

https://nme.babylonjs.com/#B7C38Y#1

You have to help the editor a bit to have the derivatives operate in the fragment shader instead of the vertex shader by setting the target property of the “Add” to “Fragment”:

https://nme.babylonjs.com/#B7C38Y#2

2 Likes

Thank you so much! I had no idea that option was there.