Yeah, so you would still have to parse the scenegraph and create your own
Uniform structure for all possible stuff found in the osg::Material's
created by various file readers.

Are there any plans for moving this over to uniform too?

Regarding Deferred Shading, are there any OpenSource projects based on
OpenSceneGraph with a framework for this?

/A


On Fri, Dec 20, 2013 at 3:11 PM, Sebastian Messerschmidt <
[email protected]> wrote:

>  Hi Anders,
>
> apart from long term plans I managed to get the appropriate behaviour by
> writing a FixedFunctionVisitor.
> It uses a modified ShaderComposition (based on Ubershaders with #defines)
> and injects the appropriate uniforms for osg::Material.
> Lights are managed a bit differently but also with a combination of
> uniforms and callbacks, effectively removing the orignal lights and
> replacing them with uniforms.
> The catch here is, that materials are no longer coupled with the existing
> states. They are transformed once and changing the osg::Material state
> attributes will no longer affect the scene.
>
> P.S. I needed to remove the fixed function light management from the graph
> anyways to transform the lightsource nodes to geometry in a deferred
> pipeline.
>
>
>  Hi Anders,
>
> On 20 December 2013 10:56, Anders Backman <[email protected]> wrote:
>
>>  I was trying to catch up a bit on the newer stuff on OpenGL.
>> What is the status of dropping all gl_material, gl_light stuff in shaders
>> (using uniforms only)?
>>
>
>  OpenGL ES 2.0 onwards does not support any of the gl_ built ins.
>
>  OpenGL 3.0 core profile like ES 2.0 does dot support any of the gl_
> builtins.
>
>  osg::State is able to remap shaders that contain the main
> gl_ModelViewMatrix etc. builtins and provides osg_ equivilants.  However,
> this doesn't extend to individual bits of the fixed function pipeline like
> gl_Materail/gl_Light etc, for these you will have to provide your own
> Uniforms.
>
>
>
>>  Is that part of any released version of OSG, or is it part of the
>> ShaderComposition work still in trunk?
>>
>
>  The ShaderComposer is part of OSG-3.2 and is able to compose shaders
> that you provide in the appropriate shader composer friendly way, see the
> osgshadercomposition example.  My long term plan is for the fixed function
> pipeline state like osg::Light etc. to provide the necessary shader
> components - both the uniforms and the shaders to enable scene graphs with
> fixed function usage to work on ES 2.0 and GL 3.0 core profiles.
>
>  Robert.
>
>
> _______________________________________________
> osg-users mailing 
> [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
>
>


-- 
__________________________________________
Anders Backman, HPC2N
90187 UmeƄ University, Sweden
[email protected] http://www.hpc2n.umu.se
Cell: +46-70-392 64 67
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to