Jump to content

Difference Between Instanced Attributed and non.


Recommended Posts

So when doing somthing like:
var uvRefBuffer = new BABYLON.Buffer(engine, uvRef, false, 2, false, false);
would create the Buffer as non Instanced.

var uvRefBuffer = new BABYLON.Buffer(engine, uvRef, false, 2, false, true);
Makes it instanced, what is the difference?
I noticed when I make it instanced things stop working, so I am wondering when would you use that and what is its convention.

Link to comment
Share on other sites

More detailed answer:

Here is the code of the GPU particles which heavily rely on instancing.


you can see that I only draw 4 vertices which are instanced this._currentActiveCount times

The main buffer contains the data for the 4 vertices (and this one is not instanciated ie. it will be repeated for all instances):


and then I have all the data that must be sent to all instances (which is unique per instance)


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.

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.


  • Recently Browsing   0 members

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