[osg-users] different materials for a geometry and highlight

Sebastian Messerschmidt sebastian.messerschmidt at gmx.de
Mon Sep 26 06:23:15 PDT 2016


Hi Gianni,
> One question,
> why should I use a "vertex" shader/attribute when I need to colour a triangle uniformly?
Long story short: There is no such thing as per-primitive colors.

Long story long:
In order to color your primitives you need to assign a color to each 
vertex. That is how modern GPU-pipelines work. Another way to tackle 
your problem is to simply assign a different color-array holding 
per-vertex colors that is updated with your selections.
I'll try to create a small example for you to make things less foggy.

Cheers
Sebastian
>
> Regards,
> Gianni
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68753#68753
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




More information about the osg-users mailing list