Jump to content

Any way to use different colors for meshes sharing same material?


Quant3D
 Share

Recommended Posts

My understanding is that every instance of a material requires a separate draw call. In a scene with many similar meshes, it would be nice to have them share one material but have basic differentiation by color or transparency.

Is this possible without creating many materials or looping over lots of vertex data?

In other words, does the standard material shader allow for color as an attribute that can be set per mesh?

Link to comment
Share on other sites

Hello,

nope as all information regarding rendering are handled by the material (and its shader). 

Just so you know: even if you have only one material shared by multiple meshes, there is still one draw call per mesh.

Only way to reduce draw calls is to use instances (which are also constrained to strictly use the same material)

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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...