[osg-users] Fixed pipeline lighting to shaders

Franco Tang osgforum at tevs.eu
Mon Sep 9 19:59:26 PDT 2019


gwaldron wrote:
> Here's some shader code you can use as a reference (not a complete solution on its own). There are also some links in the code comments you can research.
> 
> https://github.com/gwaldron/osgearth/blob/master/src/osgEarth/PhongLighting.frag.glsl (https://github.com/gwaldron/osgearth/blob/master/src/osgEarth/PhongLighting.frag.glsl)
> 
> 
> 
> 
> 
> On Sat, Aug 10, 2019, 1:49 AM Catalin < ()> wrote:
> 
> 
> > Hi,
> > 
> > 
> > Does OSG has some shaders that replicates the fixed pipeline of OpenGL (1.x) with the 8 lights?
> > 
> > 
> > Thank you,
> > Catalin
> > 
> > 
> > _______________________________________________
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> 
> 
>  ------------------
> Post generated by Mail2Forum


Thank you, gwaldron. I saw the post before. It added to my knowledge of OpenGL light. 

I am building osgEarth now. I would try to dig the source of osgEarth. Does osgEarth use shader to implement light effect rather than glLight?

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=76660#76660







More information about the osg-users mailing list