From: Allan Schaffer (allan++at++sgi.com)
Date: 07/22/2005 10:18:06
Hi Rick,
The approach you're using now is what I'd recommend since this
functionality has since been through multiple redesigns / changes /
improvements in the face of hardware shader support on more recent
systems such as Prism.
If you're using an Onyx InfiniteReality, then your choices are to go
with your current approach, or to roll back to the older versions of
Performer where we were integrated with SGI's OpenGL Shader toolkit. I
think Performer 2.5.x was the last version integrated with this (now
obsolete) toolkit; whereas the current versions of Performer now support
the OpenGL Shading Language (GLSL).
The current stuff is really much simpler :-) so if you have that option
in the future, I'd go with it...
Allan
ps. you were probably talking with Shawn Underwood, our director of
marketing..
Rick van Haasen wrote:
> Hi Alexej,
>
> because i didn't get any response, i developed my own multipass-mechanism
> for the Onyx.
> it's sad that i had to reinvent the wheel, the "old" pfShader did these
> things already....
>
> At the SGI visualisation days in Ruesselheim i talked to John Underwood of
> SGI. Het mentioned that it should be possible to use the
> "old pfShader". I should send him an email for this issue. Because i
> already had my own solution i have not contacted him yet.
> Maybe someone of SGI reading this mail could help?
>
> Anyway, for my own solution i used the following approach:
>
> Each pass has it's own geostate. Also each pass can have a pre/post
> callback (this is the optional callback of the geostate).
> One of the uses for this callback is for example to setup a specific
> opengl blending mode: from the performer-api's i could not find
> a way to fully control the opengl blending modes. From the callback, this
> is can be done.
>
>>From the "application setup" point of view, you start with a geoset that
> needs to be rendered with a specific "mp-shader".
> First the specific mp-shader is defined in terms of its passes, specific
> geostate and callback functions.
> I defined a class "ShaderMngr" which is used for defining the mp-shader.
> One of the things it does is allocating a draw-bin
> for each pass. All geosets of a certain pass will be put into this bin. In
> this way, state-changes are minimized when
> rendering multiple objects that use the same shader.
>
> After all the passes of the shader have been defined, a geoset can be
> "translated" to a "mp-geoset".
> This is done by creating a "shaderpass" object for each pass, using the
> geoset as argument.
> This object creates a copy of the geoset. This is a "shallow copy",
> meaning that the atributes like vertices are shared among all copies.
> It does allow to change the geostate that belongs to the copy. The size
> of each copied geoset is about 100 bytes.
> To each copy of the geoset, the geostate that belongs to the shaderpass
> is now connected.
> Each copy of the geoset is connected to a new geode. This geode can have
> a specific call back to do some setup for the pass
> (not that this is different from the callback of the geostate: the
> geostate callback is only called once before rendering all objects
> that share this geostate, sometimes however you need some processing for
> each object in the bin, this way you can do this).
> All geodes will be connected to a "top" group node. It is this group node
> that is attached to the scene.
>
> The draw process will execute all defined bins in a specified order,
> executing the passes for the "shadered geosets" in the correct order .
>
> success,
> Rick
>
>
>
>
>
>
>
>
>
>
> Alexej Fink
> 2005-07-20 12:46
>
> To
> Rick van Haasen/EHV/RESEARCH/PHILIPS++at++PHILIPS
> cc
>
> Subject
> performer multipass
> Classification
>
>
>
>
>
>
>
> Hello,
>
> We ( two students of University of Hamburg ) have the same problem now, as
> you mentioned on performer mailing-list:
> http://oss.sgi.com/projects/performer/mail/info-performer/perf-05-02/0037.html
>
>
> It seems that you never got any answers (mailing list search engine found
> nothing fitting).
>
> Did you ever found a solution for that problem?
> We would like to make a multipass shader-prog.
> "render the geoset 2 times, each time with a specific geostate." - was
> also our approach.
>
> Thank you in advance!
>
> Alexej Fink
>
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
-- Allan Schaffer allan++at++sgi.com Engr. Dept. Manager, Visual Systems Group 1-650-933-2160 Silicon Graphics http://www.sgi.com
This archive was generated by hypermail 2b29 : Fri Jul 22 2005 - 10:18:11 PDT