Jump to content

Mesh Tangents & BiTangents


SpiderPig
 Share

Recommended Posts

Can we not set a vertex's tangent or bitangent in Ultra?  I only found these in the Mesh class for vertices.

virtual void SetVertexPosition(const uint32_t v, const Vec3& position);
virtual void SetVertexNormal(const uint32_t v, const Vec3& normal);
virtual void SetVertexTexCoords(const uint32_t v, const Vec2& texcoords, const int index = 0);
virtual void SetVertexColor(const uint32_t v, const Vec4& color);

 

Link to comment
Share on other sites

4 minutes ago, Josh said:

They get converted into a quaternion so they can be stored in four bytes. :P

I got the idea from Crytek.

I've been looking through every piece of shader code for some wiggle room but you've stripped everything down to the bare minimum number of bytes needed so there's no room left for me. :P  But this is why Ultra is fast. ;)

3 minutes ago, Josh said:

You might be able to store your data in a texture, and then use the vertex ID as the lookup to get the extra data you want to retrieve.

I was thinking that too.  I wanted to see if there were other ways first before I started on this.  Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...