<div dir="ltr"><div><div>I think I understand now better where the confusion on how FloatVertexAttributes are mapped to vertices was coming from.<br><br></div>It is because these custom shader vertex atttributes are treated differently from regular attributes such as colors and normals. In the colorPerVertex=true case, the mapping of provided colors to provided coordinates (vertices) uses the coordinate indices (or special color indices) and not a 1:1 mapping.<br><br></div>While to me this different treatment almost looks like an oversight which should be corrected, it is probably too late to do so and not worth introducing an incompatibility.<br><div><br></div><div>It brings up if there should be an option for providing custom indices in a FloatVertexAttributeIndex node, to parallel colorIndex and normalIndex ? While reuse of a single attribute value to several vertices does sound useful, I do not know what a use case would be. But having a symmetry of custom per vertex attributes and standard (color, normal) attributes seems desirable.<br><br></div><div>Andreas<br></div><div><br><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 12, 2016 at 4:06 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">FloatVertexAttribute ordering is expected to follow coordinate ordering:<br><div><br><a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/shaders.html#Pervertexattributes" target="_blank">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/shaders.html#Pervertexattributes</a><br><br><a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/shaders.html#FloatVertexAttribute" target="_blank">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/shaders.html#FloatVertexAttribute</a><br><br></div><div>But there was some confusion if indices when provided are used instead:<br></div><div><div><br><a href="https://github.com/x3dom/x3dom/issues/596" target="_blank">https://github.com/x3dom/x3dom/issues/596</a><br><br></div><div>This would not make much sense but I had to read the spec. a couple of times.<br></div><div>Should the relevant sentence in the spec.:<br><br></div><div>"Per vertex attributes are mapped 1:1 to each vertex value."<br><br></div><div>be more explicit ? <br></div><div>Perhaps:<br></div><div><br>"Per vertex attributes are mapped 1:1 to vertex coordinates."<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Andreas<br></div><div><br>-- <br><div>Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div>