Re: [osg-users] [forum] passing material properties to shader uniforms

2017-08-01 Thread Robert Osfield
Hi Ewe, I an away on a trip so not in a position to dive into the code and see what would be appropriate. I will back at the end of the week. Robert On 1 Aug 2017 3:24 p.m., "Uwe Woessner" wrote: > Hi Robert, > > I am currently trying to port a fixed function pipeline

Re: [osg-users] [forum] passing material properties to shader uniforms

2017-08-01 Thread Uwe Woessner
Hi Robert, I am currently trying to port a fixed function pipeline application to the Hololens and thus to GLES I followed your advice and tried the shader_pipeline branch but I don't see where and how osgMaterial state or Light source information is passed to the shader. Is that still in

Re: [osg-users] [forum] passing material properties to shader uniforms

2017-06-03 Thread Gedalia Pasternak
For OpenGL 3.2, I've taken the approach of using an uniform block to replace the materials, (if you think about this materials are currently treated as something that is shared between all shaders, which is how they are implemented in the fixed function pipeline) each material has a buffer on the

Re: [osg-users] [forum] passing material properties to shader uniforms

2017-06-01 Thread Robert Osfield
Hi Goran, In standard OSG (3.2.x, 3.4.0 or the 3.5.x dev series) there isn't any way to automatically remap osg::Material to uniforms so you'll have to run a traverser through the scene graph and replace the osg::Material to osg::Uniform's. If you are willing to experiment with bleeding edge

[osg-users] [forum] passing material properties to shader uniforms

2017-06-01 Thread Goran Pantar
Hi, I'm using OpenGL ES 2.0 and having dificulties to pass the old style material properties (ambient, difusse, specular, shininess) to the uniforms used in my fragment shader. For the 3d model I use models in 3ds format with multiple materials and multiple drawables. As a dirty hack I