Jump to content

Understanding Buffers Better.


Pryme8
 Share

Recommended Posts

http://www.babylonjs-playground.com/#1TDIAH

Ok, so I am trying to figure out how the heck to attach a custom attribute and had to simplify things a whole bunch to try to understand what is happening.
I am trying to attach a "offsets" attribute to each point and then in the vertex Shader manipulate the positions with the offsets.
http://www.babylonjs-playground.com/#1TDIAH#1 but as in this example it causes the shader to invalidate.

this is directly related to the post:

I just need to get a better understanding of some of this stuff before I move on.  Figured this stuff will be important for rendering dynamic procedural foliage fields.

Link to comment
Share on other sites

So when do I need to use the offset?
https://www.babylonjs-playground.com/#1TDIAH#18

I was under the impression that I was like constructing a single Buffer with those elements and that I needed to include the offset when there was a prior one I added.
also What is the instanced flag for?  

this is stuff I kind of always ignored and I think its time to learn it all now.

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...