In nme we can add the vertex normal Node, but it seems not to be used.
I try to create a fragment shader that uses the vertex normal and the camera normal to shade an object transparently using the dot product of both vectors, but I can’t manage to do it and the code generated for the shader seems not include the normal vector…
Should anyone have an example to dot it, using nme only?
Welcome aboard!
It seems to work for me:
If you can provide a link to your material, we can try to find out what is wrong.
1 Like
Hello and welcome !
Starting from @Evgeni_Popov 's setup, if your goal is to create a fresnel-like transparency, just invert the output and use it as alpha :
Also, a nice trick if you want to edit the result while still bounding between 0 and 1, is to use the power (pow
) function :
Result if sharper fresnel :
Very nice! Thanks a lot for your help, @Tricotou , @Evgeni_Popov !!!