Jump to content

Combine Added Geometry Vertex Buffers on Mesh Merge


Recommended Posts

I will have dynamic grass if it eff word kills me.


It looks like I am losing the added buffer uvRef that I am adding to each individual blade.

Does that mean I just keep pushing the values to the array and then set the buffer on the merged mesh?  The Vertices data should be in the same order I would imagine?
But when I do that I get this result:https://www.babylonjs-playground.com/#3D3RPL#6

The Buffers seem to be there now, but using it in the shader makes it disappear so I wonder what I am doing wrong?
then the mesh reappears when I nerf line 19 in the vertShader.

this is Approx what I am going for, but from the uvRef Data not position.

Link to comment
Share on other sites


So mergeMeshes will only merge know kinds and not all of them if you add custom ones .

You will need to manually merge the custom ones


Link to comment
Share on other sites

You should try without merge at first. Making sure the shader works

Then switch to mergemeshes. I'm ok to add a version which could also merge additional custom attributes

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