Jump to content

Recommended Posts

Posted

I wonder if I can pass some custom floats per vertex to a fragment shader like this or does the extracting of the vertex colors in vert shader only work with values from 0.0f to 1.0f?

mesh->SetVertexColor(0, (float)1200, (float)1400, (float)6450, (float)780);

 

Posted

Vertex colors only work with non-skinned meshes because they are stored in the bone indices slot (or bone weights, I don't remember which). They only use one byte each and store values from 0 to 255.

  • Thanks 1

Let's build cool stuff and have fun. :)

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.

×
×
  • Create New...