Tangent and bitangent in vertex programs

Is the tangent already a value that is computed and I can get in vertex programs? What are all of the current possible in values?

For models it’s position, texcoord0 and normal.

Check out http://www.defold.com/manuals/material/#_vertex_shader_attributes

Thank you for the link. Would it be possible to make an issue for adding tangent? Bitangent can be generated from it and normal. Tangent is needed for certain kinds of shader fixes such as dealing with rotated normal map textures. Right now I need it to fix light based on normals of a rotated sprite using tileset for textures. I think it’s possible to generate in the shader program but inefficient.

1 Like