Jump to content

custom material support instance


yokewang
 Share

Recommended Posts

I want to draw a lot of spheres with different colors and matrix.

Since they all share the same geometry, so using instance draw will be an effective way.

Babylon provides a build-in instance mesh with different matrix. But other instance attribute like 'color' seems not support.

So I tried to write a custom material, but the documents about custom material/shader seems not support instance drawing.

Who can give me an example or any tips on writing a custom instanced material?

 

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.

Loading...
 Share

  • Recently Browsing   0 members

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