Re: [info-performer] pfShader wont cope with transparency

New Message Reply Date view Thread view Subject view Author view

From: Florian Berger (florian.berger++at++aec.at)
Date: 03/14/2003 01:42:33


On Thursday 13 March 2003 05:46 pm, bob kuehne wrote:
> On Thu, 13 Mar 2003, Florian Berger wrote:
> > well, actually it seemed to me as if the pfShader didnt care about bins
> > at all. i tried to assign the bins of the GeoSets by hand, but it didnt
> > change anything. still the pfShaded objects were drawn last.
>
> hi florian,
>
> i think you're correct - the pfShader is not really sortable, cause a
> particular shader may use lots of strange state, etc. but the behaviour
> you're seeing is expected. opengl shader uses the framebuffer to perform
> shading computations, so unless an isl shader preserves the existing
> contents of the buffer, they may be overwritten. what you can do to avoid
> this is:
>
> surface yourfunction()
> {
> // whatever your shader really does
> }
>
> surface blendWithExistingFrameBufferShader()
> {
> varying color prevfb = FB;
> FB = yourfunction();
> FB = over( prevfb );
> }
>
> what that should do is:
> 1) save the existing fb contents beneath your new shaded object
> 2) draw your shaded object
> 3) blend the shaded object over (using alpha) the previous results
> (other blend modes exist, in case this isn't exactly what you want,
> see /usr/share/shader/doc/islspec.html for a complete list)

well, thanks for your answer, but this sounds as if it would cost a lot of
performance.
actually i never used isl, because i need some extra hardware-features, which
i can only implement in pfShader.

thanks,
  floh

------------------------------------------------------------
Dipl.-Ing. Florian Berger
Email: florian.berger++at++aec.at
Homepage: http://www.geocities.com/harpin_floh


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Mar 14 2003 - 01:47:51 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.