I am writing a shader in GLSL (version 400) using the keyword GLSLPROGRAM.
The shader itself works fine, but I am only able to fetch the position vertex attribute (using `in vec4 position` in the vertex shader).
I need to use other attributes from the mesh vertices, like normals, uvs, uv2s, tangents, colors etc. as well.
The shader *has* to be #version 400, as it uses doubles.
How would I go about fetching uvs from the vertices? The Unity Editor only seems to recognize the vertex shader as *SM2.0*, and the fragment shader as *Fixed Function*, despite the fact both the vertex and fragment shaders have the directive #version 400
↧