Quantcast
Channel: Questions in topic: "attributes"
Viewing all articles
Browse latest Browse all 16

GLSL version 400 vertex attributes

$
0
0
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

Viewing all articles
Browse latest Browse all 16

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>