Lionel Maiaux (maiaux++at++quartz.corys.fr)
Tue, 29 Aug 1995 08:38:23 +0100
Some time ago, Robert Webb wrote he had problems to implement fog with
projected textures (I post his mail again at the end of this one). I have the
same difficulties and I'm sure we are not alone!
I suppose this is not a Performer specific bug (as Robert, I use IRIS GL calls
with Performer) but we would like to know :
1 - if this bug is well known from SGI,
2 - if it's corrected with OPEN GL,
3 - if there are plans to correct it.
Thanks to SGI to help us!
Lionel
> Hi guys,
>
> It's me again, and I'm still trying to get my projected textures working
> properly. Just one problem left! (I think).
>
> I am doing two passes of pfDraw() in the one draw traversal callback. The
> first pfDraw draws everything in a grey colour that represents the colour of
> the ambient light, and resolves the zbuffer in preparation for the second
> pass.
>
> The second pass uses zfunction(ZF_EQUAL) to ensure that each pixel is
> touched only once, and also uses this:
> blendfunction(BF_DC, BF_ZERO);
> instead of the usual:
> blendfunction(BF_ONE, BF_ZERO);
>
> This means instead of each pixel getting set to the SOURCE colour, it is set
> to SOURCE*DEST, ie it is multiplied by the colour which is already there
> (and represents the ambient lighting).
>
> HOWEVER! It seems the SOURCE colour includes the colour adjustment caused
> by the fog, even though I really want fog to be added later. This means
> that the fog colour is also being multiplied by the DEST colour, hence
> making my fog seem darker for the geometry which goes through this projected
> texture process (lightpoints etc do not, and hence have the normal fog,
> making them appear light grey while everything else is a darker grey, for
> very thick fog).
>
> HELP! Someone must have tackled this before. Someone must have used fog
> with projected textures successfully. How is it done?
>
> Many thanks,
> Rob.
>
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:50 PDT