Pryme8 Posted March 22, 2018 Share Posted March 22, 2018 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. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 22, 2018 Author Share Posted March 22, 2018 http://www.babylonjs-playground.com/#1TDIAH#3 I think this is close but I can not tell... *EDIT* http://www.babylonjs-playground.com/#1TDIAH#4 hmmm go figure... worked it out maybe. *EDIT EDIT* but not yet for multiples: http://www.babylonjs-playground.com/#1TDIAH#5 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted March 23, 2018 Share Posted March 23, 2018 Your color offset was incorrect: https://www.babylonjs-playground.com/#1TDIAH#5 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 23, 2018 Author Share Posted March 23, 2018 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. 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.