Re: [osg-users] Shader composition with multiple function injection

2018-05-13 Thread Robert Osfield
Hi Hartwig, On 12 May 2018 at 22:59, Hartwig Wiesmann wrote: > In the example code one directional light computation can be injected. What > is the best solution if I like to inject 0 to N directional lights where N is > runtime dependent? > > I could do something like: > > Code: > > #ifdef L

[osg-users] Shader composition with multiple function injection

2018-05-12 Thread Hartwig Wiesmann
Hi, I had a look at the shader composition example. The main shader looks like this: Code: #pragma import_defines ( LIGHTING, TEXTURE_2D, VERTEX_FUNC(v) ) #ifdef LIGHTING // forward declare lighting computation, provided by lighting.vert shader void directionalLight( int lightNum, vec3 normal,

Re: [osg-users] shader composition

2015-01-29 Thread Trajce Nikolov NICK
Thanks Robert, Robert, I will wait for the new code then. Nick On Thu, Jan 29, 2015 at 11:54 AM, Robert Milharcic < robert.milhar...@ib-caddy.si> wrote: > On 29.1.2015 0:23, Trajce Nikolov NICK wrote: > >> I read the shader composition code and the used classes - which are really >> without any

Re: [osg-users] shader composition

2015-01-29 Thread Robert Milharcic
On 29.1.2015 0:23, Trajce Nikolov NICK wrote: I read the shader composition code and the used classes - which are really without any documentation:-). Can someone give a fast intro into this, the sample for example? Thanks a bunch as always Hi Nick, I once did some experimental coding on shad

Re: [osg-users] shader composition

2015-01-29 Thread Robert Osfield
Hi Nick, On 28 January 2015 at 23:23, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > > I read the shader composition code and the used classes - which are really > without any documentation :-). Can someone give a fast intro into this, the > sample for example? > ShaderComposition

[osg-users] shader composition

2015-01-28 Thread Trajce Nikolov NICK
Hi Community, I read the shader composition code and the used classes - which are really without any documentation :-). Can someone give a fast intro into this, the sample for example? Thanks a bunch as always Nick -- trajce nikolov nick ___ osg-user

Re: [osg-users] Shader Composition

2011-09-14 Thread Robert Osfield
Hi Bo, ShaderComposer isn't complete, and should be viewed as experimental, but it's able to do a few composition tasks. The osgshadercomposition example is a test bed for this feature, unfortunately I've been swamped with other work so haven't been able to complete the work on ShaderComposition

[osg-users] Shader Composition

2011-09-13 Thread Bo Jiang
Hi All, I have a node, and I want to shade it using different effect, i.e. I have several groups of shaders (vertex+geometry+fragment), and each group implements one effect. Now I want to combine all the effects together when display the node. I do not know how to achieve it. I searched the fo

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-07-02 Thread Robert Osfield
Hi All, I've started doing a preliminary implementation the of the design I discussed in previous emails. I've introduced ShaderComponent and now StateAttribute "has a" optional ShaderComponent. I've also fleshed out a bit more of ShaderComposer with some very simple wiring in osg::State to inv

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-07-01 Thread Robert Osfield
Hi Brad, On Thu, Jul 1, 2010 at 11:18 AM, Christiansen, Brad wrote: > One thing I am not clear on is how the rules for injecting a Shader into a > ShaderMain would work. This is an area I have had difficulty with in my own > shader assembly approach. For example, how will it be possible to chan

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-07-01 Thread Christiansen, Brad
Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, 1 July 2010 4:30 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Shader composition, OpenGL modes and custom modes Hi All,

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-07-01 Thread Robert Osfield
Hi All, I've been thinking about the various classes and relationships that we'll need to support both the front end API for shader composition, and the backend implementation of it, and my current thoughts are: 1) The ShaderSet I've been discussing over my last few post should be renamed, my

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-30 Thread Christiansen, Brad
2010 5:05 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Shader composition, OpenGL modes and custom modes Hi Roland, On Tue, Jun 29, 2010 at 10:22 PM, Roland Smeenk wrote: >> 1) Provide a way of encapsulating all the details required to >> contribute a single ch

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-30 Thread Robert Osfield
Hi Adrian, I don't think we need worry about high level algorithms with shader composition, they should all just work fine. My expectation is that only the fine grained management of state needs to tackled with shader composition, the coarsed grained RenderBin/RenderStage multi-pass techniques wi

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-30 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert, hi others, I am currently working on image processing pipelines based on GLSL shaders. Currently we have many different special effects (shaders) but all of them work encapsulated. May we should also think on other topic while overwork the shader composite idea. i review the osgvirtualp

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-30 Thread Robert Osfield
Hi Roland, On Tue, Jun 29, 2010 at 10:22 PM, Roland Smeenk wrote: >> 1) Provide a way of encapsulating all the details required to >> contribute a single chunk of functionality that will be combined with other >> active ShaderSet to provide final composed osg::Program. > > Isn't this what I solv

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-30 Thread Robert Osfield
Hi Bruce, On Tue, Jun 29, 2010 at 5:41 PM, Bruce Wheaton wrote: > One is that GLSL is quite poor for initialization. The main problem with this > is if you were to enable a shader with, say, 8 uniforms, there wasn't, until > very recently, a way to initialize them, and the stateset enable calls

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-29 Thread Roland Smeenk
Hi Robert and others, unfortunately I am experiencing some stressfull time at work which does not really allow me to contribute to this thread as much as I would like to. I am trying to keep up with the posts, but not all posts are clear to me. robertosfield wrote: > > 1) Provide a way of enc

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-29 Thread Bruce Wheaton
> Very excited about the new features Robert, sounds like you're really cracking on. I had two thoughts I hope you'll consider integrating: One is that GLSL is quite poor for initialization. The main problem with this is if you were to enable a shader with, say, 8 uniforms, there wasn't, until

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-29 Thread Mathias Fröhlich
Hi Robert, On Tuesday 29 June 2010, Robert Osfield wrote: > I believe we'll all be in agreement here. This is certainly what I'm > aiming for, all the designs I'm working on use a program cache as a > fundamental part of the design, with state changes minimized. I don't > see it all as much dif

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-29 Thread Robert Osfield
I've not at the computer full time for the last couple of days so haven't been able to push the shader composition implementation on yet. Design wise I've been doing bits here and there. My latest thought is that we probably need to encapsulate the component that will go to make up shader composi

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-29 Thread Robert Osfield
Hi Mathias, 2010/6/29 Mathias Fröhlich : > So, what I think is that we need minimize shader compilation as well as shader > *linking* as much as possible. If the implementation you have in mind really > does this, then fine. If you intent to relink on about every > StateAttribute::compose(osg::St

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-29 Thread Mathias Fröhlich
Hi Robert, On Monday 28 June 2010, Robert Osfield wrote: > Yes, even if we tweak the API a bit in StateSet any new elements will > sorted virtue of being in StateSet. Whatever we do StateSet's will > remain the container for all things state in the scene graph, and the > what basis of coarsed gr

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-28 Thread Robert Osfield
Hi Mathias, 2010/6/28 Mathias Fröhlich : > So, ok, we will get state sorting for the fixed function pipline state > attributes because of these being traditionally sorted in the state graph. > Ok, and the additional non fixed function shader snipets will be sorted > because of being such state att

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-28 Thread Robert Osfield
Hi Tim, On Sat, Jun 26, 2010 at 6:05 PM, Tim Moore wrote: > OK, so the "shader generation" or fixed function emulation provides more > shaders that might be linked or combined by "shader composition," and the > "shader candidate functions" are controlled by existing OSG state > attributes? Our t

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-28 Thread Mathias Fröhlich
Hi Robert, On Saturday 26 June 2010, Robert Osfield wrote: > The plan I have wouldn't affect state sorting, and lazy state updating > of the composed shader programs would be utilized, and caching of the > composed shader programs would be used once it has been composed. > Only when you change mo

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-26 Thread Tim Moore
On Sat, Jun 26, 2010 at 12:30 PM, Robert Osfield wrote: > Hi Tim, > > On Fri, Jun 25, 2010 at 8:37 AM, Tim Moore wrote: > > Is it fair to say that the major interest in shader generation is in > porting > > existing OSG apps to OpenGL ES 2.0, which doesn't have any fixed > pipeline? > > I wouldn'

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-26 Thread Robert Osfield
Hi Tim, On Fri, Jun 25, 2010 at 8:37 AM, Tim Moore wrote: > Is it fair to say that the major interest in shader generation is in porting > existing OSG apps to OpenGL ES 2.0, which doesn't have any fixed pipeline? I wouldn't agree with this statement. It's not about GLES 2.0 and it's not about

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-26 Thread Robert Osfield
Hi Johannes, I don't believe VirtualProgram is sufficiently sophisticated for our purposes, I agree about linking existing osg::Shader rather than composing these on the fly like in Roland's implementation. However we still have to inject code into the main for each of the vertex, geometry and fr

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-26 Thread Robert Osfield
Hi Mathias, 2010/6/25 Mathias Fröhlich : > With that proposal - espcially the StateAttribute::compose call working > directly on the osg::State - I conclude that we need to relink during draw: > * we will probably loose state sorting for the shader combinations > * shaders need to be at least reli

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-25 Thread Bruce Wheaton
On Jun 25, 2010, at 6:42 AM, Mathias Fröhlich wrote: > With that proposal - espcially the StateAttribute::compose call working > directly on the osg::State - I conclude that we need to relink during draw: > * we will probably loose state sorting for the shader combinations > * shaders need to be

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-25 Thread Mathias Fröhlich
Hi Robert, On Thursday 24 June 2010, Robert Osfield wrote: > Thoughts? Suggestions? Just a thought. Without a real concrete plan how to improove - sadly. With that proposal - espcially the StateAttribute::compose call working directly on the osg::State - I conclude that we need to relink durin

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-25 Thread Johannes Maier
Hi, as I mentioned somewhere else, we are also thinking about a shader composition concept. After some consideration we came to the conclusion, that shader linking is probably the most time-effective approach. So we would go with Wojtek and use his VirtualProgram - extending and implementing i

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-25 Thread Robert Osfield
hat the discussion is focusing on second > step when first one was not made yet. > > Cheers, > Wojtek Lewandowski > PS. I won't be able to respond for next 3 days. > > > > -- > From: "Robert Osfield" > Sent

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-25 Thread Tim Moore
On Fri, Jun 25, 2010 at 12:25 AM, Wojciech Lewandowski < lewandow...@ai.com.pl> wrote: > Hi Guys, > > We all seem to agree that the topic actually consists from two subtopics: > ShaderGeneration and ShaderComposition. Shader generation would be mostly > used to emulate Fixed Pipeline and replace G

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-24 Thread Wojciech Lewandowski
Lewandowski PS. I won't be able to respond for next 3 days. -- From: "Robert Osfield" Sent: Thursday, June 24, 2010 4:51 PM To: Subject: Re: [osg-users] Shader composition, OpenGL modes and custom modes Hi All, As another

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-24 Thread Robert Osfield
Hi All, As another step towards experimenting with shader composition I've renamed the osgshadercompositor example to osgvirtualprogram as this example is based around a VirtualProgram class, and I'd like to differentiate between test beds like this and work to towards the final shader composition

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-24 Thread Robert Osfield
I'm continuing my pondering of shader composition and I'm currently thinking about extending StateAttribute a little to support shader composition. Currently we have two virtual methods in StateAttribute::getModeUsage(ModeUsage&) and StateAttribute::apply(State&) that subclasses override to provid

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-24 Thread Robert Osfield
Hi Roland, On Wed, Jun 23, 2010 at 11:20 PM, Roland Smeenk wrote: > I have to dig up the thoughts I had during the period I implemented the > shader composition that you reviewed. The goals you mention where also the > ones I tried to achieve. There are lots of parallels with what thoughts I k

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-24 Thread Robert Osfield
Hi Bruce, On Wed, Jun 23, 2010 at 9:23 PM, Bruce Wheaton wrote: > So, we would do the same enable calls on state sets with custom made enums, > and then also provide a shader function that will be used only if that > feature is enabled? Yes that's the idea. > It sounds like a great idea... al

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-23 Thread Roland Smeenk
Hi Robert, I have to dig up the thoughts I had during the period I implemented the shader composition that you reviewed. The goals you mention where also the ones I tried to achieve. robertosfield wrote: > > The absolute minimum code changes required in end user apps is none at > all, might t

Re: [osg-users] Shader composition, OpenGL modes and custom modes

2010-06-23 Thread Bruce Wheaton
So, we would do the same enable calls on state sets with custom made enums, and then also provide a shader function that will be used only if that feature is enabled? It sounds like a great idea... although isn't it maybe sufficiently useful that it deserves it's own enable and set functions, e

[osg-users] Shader composition, OpenGL modes and custom modes

2010-06-23 Thread Robert Osfield
Hi All, I'm currently brainstorming on how to support of shader composition in the OSG, and would like to get some feedback one element of a possible approach that I'm considering. Two of my design goals is to provide a good mapping between the fixed function pipeline and shader based pipelines,

[osg-users] shader composition (review?experience?)

2010-04-20 Thread Trajce (Nick) Nikolov
Hi Community, recently there was submission on osg-submission list with shader composition. Has anyone done some work on it? What are your thoughts, experience? -Nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegr

Re: [osg-users] Shader Composition - pixel formats

2010-03-15 Thread Jean-Sébastien Guay
Hi Bruce, The phrase gets thrown around a lot, and there seems to be an assumption that everyone knows exactly what it means in this context. I'm new, I don't, and searching doesn't seem to solve the problem. You're right, when we talk about shader composition it's what we're labeling our att

[osg-users] Shader Composition - pixel formats

2010-03-15 Thread Bruce Wheaton
The phrase gets thrown around a lot, and there seems to be an assumption that everyone knows exactly what it means in this context. I'm new, I don't, and searching doesn't seem to solve the problem. My presumption is that it's an effort to solve the problem of recent 'shader only' OpenGL ve

Re: [osg-users] Shader composition

2010-02-25 Thread Chris 'Xenon' Hanson
On 2/25/2010 2:02 AM, Robert Osfield wrote: > If someone wants to help fund my efforts on shader composition then feel > free :-) I'll find out where they stand on it. > Robert. -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now

Re: [osg-users] Shader composition

2010-02-25 Thread Wojciech Lewandowski
VirtuaProgram combinations. It will be much trickier, though... Wojtek Lewandowski - Original Message - From: Robert Osfield To: OpenSceneGraph Users Sent: Thursday, February 25, 2010 10:59 AM Subject: Re: [osg-users] Shader composition Hi Lilith, On Thu, Feb 25

Re: [osg-users] Shader composition

2010-02-25 Thread Robert Osfield
Hi Lilith, On Thu, Feb 25, 2010 at 9:12 AM, Lilith Bryant wrote: > I highly suggest you do some benchmarking on shader compiling/link times. > We > investigated this a couple of years ago, and found that we couldn't avoid > an > output glitch (due to compile/link time) whenever we needed a new

Re: [osg-users] Shader composition

2010-02-25 Thread Lilith Bryant
Robert, Chris, et al, I highly suggest you do some benchmarking on shader compiling/link times. We investigated this a couple of years ago, and found that we couldn't avoid an output glitch (due to compile/link time) whenever we needed a new shader. GL Drivers may well have improved since then

Re: [osg-users] Shader composition

2010-02-25 Thread Robert Osfield
Hi Chris, My plan is still to tackle the shader composition prior to 3.0. I haven't had a chance to make any more progress on it this yet as I've been hunkered down with merging submissions/bug fixes/refactors of problematic parts of the OSG. To tackle shader composition I really need to hide my

Re: [osg-users] Shader composition

2010-02-24 Thread Trajce (Nick) Nikolov
I am interested. At present I built a prototype using the osgcandidate::VirtualProgram. Works well, but perfromancewise is not so good, so waiting for the real thing. -Nick On Thu, Feb 25, 2010 at 4:27 AM, Chris 'Xenon' Hanson wrote: > One of my clients is headed squarely into a place in their

[osg-users] Shader composition

2010-02-24 Thread Chris 'Xenon' Hanson
One of my clients is headed squarely into a place in their project where they need to do a lot of sophisticated shader work throughout the whole scenegraph. I was reading back along message history from January and I saw some mention of shader composition coming to OSG in an official manner

Re: [osg-users] shader composition

2010-01-11 Thread Robert Osfield
Hi Nick, On Sat, Jan 9, 2010 at 7:20 PM, Trajce Nikolov wrote: > while ago you mentioned this is something upcoming. I am talking about > composition of shaders in the osg core - something like the osg candidate > virtual program. Any news about this? I haven't dived back into work on shader com

Re: [osg-users] shader composition

2010-01-09 Thread Paul Martz
I'm also interested. Just about to start using VirtualProgram intensely, with the hope that whatever the final solution is will be an easy port from VirtualProgram. Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ +1 303 859 9466 Trajce Nikolov w

[osg-users] shader composition

2010-01-09 Thread Trajce Nikolov
Hi Robert, while ago you mentioned this is something upcoming. I am talking about composition of shaders in the osg core - something like the osg candidate virtual program. Any news about this? Thanks Nick http://www.linkedin.com/in/tnick ___ osg-users