yokewang Posted December 27, 2017 Share Posted December 27, 2017 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. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 27, 2017 Share Posted December 27, 2017 hi http://www.babylonjs-playground.com/#Q7RPXC#2 it is mathematical instance calculated https://www.babylonjs-playground.com/#1QC9DP#170 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.