Horde3D http://horde3d.org/forums/ |
|
Custom per-vertex attributes http://horde3d.org/forums/viewtopic.php?f=1&t=1244 |
Page 1 of 1 |
Author: | Rauy [ 11.09.2010, 22:38 ] |
Post subject: | Custom per-vertex attributes |
Hello, I'm quite new to Horde3D but I have noticed, that you are not able to define custom attribute variables in the vertex shaders (or at least Horde cannot feed them to you) and I think this is a feature that is definitely missing, despite Horde's high flexibility. I don't have too much understanding of Horde's internals, but I think it could be introduced quite easiely. The user could just define a number of optional custom attributes in the .geo file together with their number of components and type (or always float). Then in the material you establish a mapping from a shader's named vertex attribute to the corresponding geo-attribute (which could also be named or just indexed). If a shader or context does not use additional attributes of a mesh, they are just ignored (attrib array disabled). Just an idea. |
Author: | marciano [ 12.09.2010, 21:54 ] |
Post subject: | Re: Custom per-vertex attributes |
Hi, thanks for your feedback! I agree that being able to define custom vertex streams and layouts is very useful. We will take care of that after Beta5 when the model format gets refactored anyway (to make it less scene graph centric). Any further ideas and suggestions on how to expose this via the API are as always very welcome. |
Author: | MistaED [ 13.09.2010, 02:24 ] |
Post subject: | Re: Custom per-vertex attributes |
While we're on the subject, what vertex stream would you think would be ideal to store vertex colours into? If I remember correctly, it was I think tangents which get dynamically produced by dot products in the shader so their vertex streams are essentially not used anymore right? Or maybe the skin weight attribute could be used... Thanks! |
Author: | marciano [ 14.09.2010, 21:16 ] |
Post subject: | Re: Custom per-vertex attributes |
Yeah, until support for more dynamic vertex layouts is available, you could use the the skinning data streams for static meshes or the second tex coord set. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |