-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebGLRenderer: Fix issue 19430. and enable rendering without vertex data. #19451
Conversation
Note: some discussion on background at #19430 |
Original sample at https://jsfiddle.net/sjpt/Lrhjkstz |
hacky replacement of gui with dat.gui version for second sample above https://jsfiddle.net/kse6vd3g/ |
Changed title to reflect that this resolves the change introduced in 117 that broke code that previously worked, as well as allowing new usage. |
2**64 thanks @sjpt! I just hit this exact problem attempting to upgrade from 110 to 111 and had a heck of a time figuring out what was going on. It turns out I was not passing an attribute named "position" to my BufferGeometry. I was passing positional information, but under a different buffer name. In version 110, this was allowed, and I could just set my vertex position in the vertex shader without issue. In version 111, nothing is rendered unless I rename my buffer with position data "position"! |
I just submitted an issue (#24165) that got rightfully closed as a duplicate. This looks like a great improvement. Any chance of something like this being adopted? What is still lacking? It is a bit discouraging that the last activity seems 2 years ago... Edit: I suppose one thing that could be improved is cleaning up logic/control flow. I think it is a bit hard to follow. Essentially, the problem seems to be that we want to compute
I have labelled the last two as optional, because personally I would generally prefer a warning rather than silently changing the given |
Closing in favor of #24179. |
* Clean up of #19451. * Additional check and example. * Removed temporary inline objects. * Added screenshot for example. * Updated draw range in example. * Added screenshot for example. * Added description for example. * Removed old code from example. * Changed noise function in example. * Renamed example. * Prettier example. * Simplified conditional. * Fixed _maxInstanceCount undefined. * Directly initialize drawStart/drawEnd from drawRange.
Allow use of procedural geometry (a) with no index or position attributes, and/or (b) no instance attributes.