<div dir="ltr"><div><br>Wouldn't that imply that neighbor triangles cannot share their vertices because the normal is different for each primitive? For high resolution meshes this could create quite some overhead (memory and processing wise). Is there a more efficient way to get flat shading that would not require any vertex duplication?<br><br></div>Christian<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-14 12:59 GMT+02:00 Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Julie,<br><br></div>OpenGL doesn't support bind per primitive, there is deprecated OSG pathway for BIND_PER_PRIMITIVE but it has to emulate the functionality and is very inefficient.  <br><br>The closest you can get to what you are after is to BIND_PER_VERTEX and then use flat shading.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Robert.<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 14 September 2015 at 10:56, Julie Green <span dir="ltr"><<a href="mailto:laroux92@mail.ru" target="_blank">laroux92@mail.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have a surface, made of triangles. Is there a way to bind surface normals per triangle, not per vertex (don't want to calculate vertex normals)?<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Julie<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=65128#65128" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=65128#65128</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br></div>