Oups, this should be correct.

glDisable( GL_FOG );
DrawLightmaps( );
glEnable( GL_FOG );
glBlendEquation( GL_FUNC_ADD );
glBlendFunc( GL_DST_COLOR, GL_ZERO );
DrawUnlitGeometry( );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );

--
This way the second pass will set the destination to
d1 = d0*s + 0*d0;
which means it will just modulate the textured geometry by the lightmap.
If you draw anything else after this you have to set the glBlendFunc 
again (eg see last line).
The important thing is to disable Fog during the first pass otherwise it 
will be added two times.

Andrew Lucas schrieb:
> I thought your wrote GL_FUNC_REPLACE by mistake, because 
>
> I couldn't find any references of it at all, so I tried using all
>
> the others that they listed, but they all produced weird results.
>
>  
>
> Also, using GL_ZERO as the destination ruins the lighting
>
> quality on my brushes, wich I'd like to avoid.
>
>  
>
>  
>
> _________________________________________________________________
> More than messages–check out the rest of the Windows Live™.
> http://www.microsoft.com/windows/windowslive/
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>   


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to