How to obtain barycentric coordinates? (Wireframe Shader)
I'm a shader noob trying to write a wireframe shader.
it seems that the way to do this is to use barycentric coordinates, meaning location inside of the vertex. This is a webgl example of using barycentric coords to do a wireframe shader: http://codeflow.org/entries/2012/aug/02/easy-wireframe-display-with-barycentric-coordinates/
However in the shader docs I don't see any way of obtaining the barycentric coordinates. Is there another option? I can't see any Godot examples of doing either wireframe or edge enhancements in shader. does anyone know some resources?
I know I can do edge enhancement by inverse hull or by a postprocess screen shader, but I'm interested in learning how to write model shaders.