Color "overlays" are fairly simple. A one-line fragment shader:

gl_FragColor = gl_Color * color_uniform;

Where color_uniform is a vec4 uniform specifying RGBA color.

This is the simplest of cases, of course. If you have other lighting or 
texturing going on, you would also need to account for that.


Matthew W. Fuesz
Software Engineer Asc.
Lockheed Martin STS
1210 Massillon Road
Akron, OH 44315
[EMAIL PROTECTED]
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Morné Pistorius
Sent: Tuesday, August 12, 2008 8:47 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] shader or effect to show selected model

I did have a look at osgScribe before posting, but overlaying the
wireframe is a bit heavy for models with very high polygon counts.  I
was looking for something a bit more subtle.

Cheers,
Morne

On Tue, Aug 12, 2008 at 12:13 PM, Paul Melis <[EMAIL PROTECTED]> wrote:
> Morné Pistorius wrote:
>>
>> Hi everybody,
>>
>> I am looking for a bit of inspiration.  I want to apply some sort of
>> effect to a picked model in my scene to show that it has been
>> selected.  Does anyone have some ideas (or an example shader or code
>> snippet would be excellent!)  that they are willing to throw my way?
>> Ideally I would like to have something that uses the geometry of the
>> model itself, instead of creating new geometry.
>>
>
> See the osgscribe example for a possible way...
>
> Paul
>>
>> Thanks!
>>
>> Regards,
>> Morne
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to