Re: [osg-users] osgvertexprogram example
Hi Sajjad, It's late here so I'll be brief. It's an example using the vertex program extension. http://www.opengl.org/registry/specs/ARB/vertex_program.txt There are other examples using GLSL. Regards, Brede On Sat, Apr 11, 2009 at 6:29 PM, ami guru wrote: > Hello forum, > > The shader string in the vertex program example in the assembly code i > guess. > > And it is not making much sense to me. > > Is that possible to provide the high-level shader (GLSL) snippet and update > the patch? > > Regards > Sajjad > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgvertexprogram example
Hello forum, The shader string in the vertex program example in the assembly code i guess. And it is not making much sense to me. Is that possible to provide the high-level shader (GLSL) snippet and update the patch? Regards Sajjad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgvertexprogram example
Oh, that's for sure, what I wanted is to be able to read the code to learn from it. Later I'll probably implement it with GLSL, unless the assembly code has a lot better performance... Does anyone have such statistics by any chance? In the osgvertexprogram, if I understood correctly, the shader uses the cube map texture to create the refraction effect. I want to do similar thing to create reflection of arbitrary object. I guess I could find on the net a lot of GLSL shaders that do reflection and refraction, but I thought I might learn the assembly language as well to learn from the examples under my hands. Thanks anyway, Guy. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, April 02, 2008 5:36 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgvertexprogram example Hi Guy, What I really recommend is that you use GLSL, unless there is really strong reason to use ARB_vertex_program I would avoid it as GLSL shaders as far more flexible and expose latest features of graphics cards which ARB_verex_program can't. Robert. On Wed, Apr 2, 2008 at 4:51 PM, Guy <[EMAIL PROTECTED]> wrote: Ok, thanks. I'll check the specs as you suggested. Hope I'll find there information about that assembly language. Thanks again, Guy. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, April 02, 2008 3:40 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgvertexprogram example On Wed, Apr 2, 2008 at 3:32 PM, Guy <[EMAIL PROTECTED]> wrote: Hmm.. in the example there is code, I meant what language is it? It's not GLSL. Is it Cg? I'm not familiar with shaders beside GLSL and I want to read that refraction shader in order to implement a different shader, and I want to know what language to learn. ARB_vertex_program predates GLSL and Cg, its more akin to assembly than a high level language like GLSL or Cg. These days just use GLSL as per osgshaders. The osgvertexprogram predates GLSL software and hardware so isn't a great example unless you need to target old hardware that doesn't support GLSL. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgvertexprogram example
Hi Guy, What I really recommend is that you use GLSL, unless there is really strong reason to use ARB_vertex_program I would avoid it as GLSL shaders as far more flexible and expose latest features of graphics cards which ARB_verex_program can't. Robert. On Wed, Apr 2, 2008 at 4:51 PM, Guy <[EMAIL PROTECTED]> wrote: > Ok, thanks. > > I'll check the specs as you suggested. > > Hope I'll find there information about that assembly language. > > > > Thanks again, > > Guy. > > > -- > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *Robert Osfield > *Sent:* Wednesday, April 02, 2008 3:40 PM > *To:* OpenSceneGraph Users > *Subject:* Re: [osg-users] osgvertexprogram example > > > > On Wed, Apr 2, 2008 at 3:32 PM, Guy <[EMAIL PROTECTED]> wrote: > > Hmm.. in the example there is code, I meant what language is it? It's > not GLSL. Is it Cg? I'm not familiar with shaders beside GLSL and I want > to read that refraction shader in order to implement a different shader, > and I want to know what language to learn. > > > ARB_vertex_program predates GLSL and Cg, its more akin to assembly than a > high level language like GLSL or Cg. > > These days just use GLSL as per osgshaders. The osgvertexprogram predates > GLSL software and hardware so isn't a great example unless you need to > target old hardware that doesn't support GLSL. > > Robert. > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgvertexprogram example
Ok, thanks. I'll check the specs as you suggested. Hope I'll find there information about that assembly language. Thanks again, Guy. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, April 02, 2008 3:40 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgvertexprogram example On Wed, Apr 2, 2008 at 3:32 PM, Guy <[EMAIL PROTECTED]> wrote: Hmm.. in the example there is code, I meant what language is it? It's not GLSL. Is it Cg? I'm not familiar with shaders beside GLSL and I want to read that refraction shader in order to implement a different shader, and I want to know what language to learn. ARB_vertex_program predates GLSL and Cg, its more akin to assembly than a high level language like GLSL or Cg. These days just use GLSL as per osgshaders. The osgvertexprogram predates GLSL software and hardware so isn't a great example unless you need to target old hardware that doesn't support GLSL. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgvertexprogram example
On Wed, Apr 2, 2008 at 3:32 PM, Guy <[EMAIL PROTECTED]> wrote: > Hmm.. in the example there is code, I meant what language is it? It's > not GLSL. Is it Cg? I'm not familiar with shaders beside GLSL and I want > to read that refraction shader in order to implement a different shader, > and I want to know what language to learn. > ARB_vertex_program predates GLSL and Cg, its more akin to assembly than a high level language like GLSL or Cg. These days just use GLSL as per osgshaders. The osgvertexprogram predates GLSL software and hardware so isn't a great example unless you need to target old hardware that doesn't support GLSL. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgvertexprogram example
Hmm.. in the example there is code, I meant what language is it? It's not GLSL. Is it Cg? I'm not familiar with shaders beside GLSL and I want to read that refraction shader in order to implement a different shader, and I want to know what language to learn. Thanks, Guy. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, April 02, 2008 10:34 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgvertexprogram example Hi Guy, On Wed, Apr 2, 2008 at 10:16 AM, Guy <[EMAIL PROTECTED]> wrote: > What language is the shader in osgvertexprogram? It'll based on ARB_vertex_program so you can get the specs from OpenGL docs/extension registry. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgvertexprogram example
Hi Guy, On Wed, Apr 2, 2008 at 10:16 AM, Guy <[EMAIL PROTECTED]> wrote: > What language is the shader in osgvertexprogram? It'll based on ARB_vertex_program so you can get the specs from OpenGL docs/extension registry. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgvertexprogram example
Hi, What language is the shader in osgvertexprogram? Thanks, Guy. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org