From: Florian Berger (florian.berger++at++aec.at)
Date: 01/27/2003 08:33:28
On Friday 24 January 2003 04:52 pm, you wrote:
> On Fri, 24 Jan 2003, Florian Berger wrote:
> > however, when i use transparent objects in the same scene, the
> > transparency is not correctly displayed when intersecting with the
> > shaded object (transparent regions have sky color).
> >
> > so it seems to me that shader passes are generally drawn after all
> > drawBins, because changing either drawBins of the shaded or unshaded
> > geosets didnt take any effect.
>
> i'm not sure if that is the case, perhaps someone from the performer team
> can answer specifics about when pfShaders are rendered. however...
>
> > is my suspect correct? and is there a way that shaders cope with
> > transparencies?
>
> transparent shaders, as you've noted, work correctly, however shaders
> written in isl don't necessarily do anything with the existing contents of
> the framebuffer. for example:
>
> surface foo() { FB = color( 1,0,0,.5 ); }
>
> will simply replace the contents of the fb with that shader's results. if
> you want to do something with the existing contents of the framebuffer,
> say, render a shaded appearance, and then blend with the existing fb
> contents. you could do something like this:
>
> surface bar()
> {
> varying color aa = FB;
> foo();
> FB = over( aa );
> }
>
> the reason for the wrapping is that if you do stuff in foo that requires
> exclusive access to the framebuffer, your pre-existing contents may get
> overwritten. but the above should allow you to blend contents of the
> results of surface shader foo with the preexisting framebuffer contents.
> please examine the shader spec (/usr/share/shader/doc/user/islspec.html)
> for all the possible blend modes you can use within a shader.
>
> so, it's still possible that pfShader objs are rendered before there are
> other fb contents, and so all you see is the clear-color. but it's also
> possible that your shader is obliterating the prev contents as well.
no, i dont think so, i really think its a matter of tranparent-bins writing
into the z-buffer before any pfShader-drawing occurs.
so the problem is pfShader objs are rendered after all other objs are drawn
(even transparent ones - which should be rendered last).
furthermore i dont think ISL can handle the kind of nvidia-lowlevel stuff i
need, so im somewhat bound to pfShader.
but thanks for the prompt reply,
floh
------------------------------------------------------------
Dipl.-Ing. Florian Berger
Email: florian.berger++at++aec.at
Homepage: http://www.geocities.com/harpin_floh
This archive was generated by hypermail 2b29 : Mon Jan 27 2003 - 08:37:52 PST