2008/6/16 Brian Paul <[EMAIL PROTECTED]>:
> H. Verbeet wrote:
>>
>> ------------------------------------------------------------------------
>>
>> Vertex programs replace fog coord generation, but not vertex fog
>> application. This also means the fog stage should be run after the vertex
>> program stage.
>
> Hmmm, can you point me to where this is stated in the vertex program
> extension spec?  I don't recall seeing this before.
>

Although it doesn't explicitly say vertex programs don't replace
vertex fog application, it's implied by the following parts of the
spec:

> Section 2.14.3.4,  Vertex Program Results
...
>     If a result variable binding matches "result.fogcoord", updates to the "x"
>     component of the result variable set the transformed vertex's fog
>     coordinate.  Updates to the "y", "z", and "w" components of the result
>     variable have no effect.
...
> Additions to Chapter 3 of the OpenGL 1.3 Specification (Rasterization)
...
>     Modify Section 3.10, Fog (p. 154)
>
>     (modify second paragraph) This factor f may be computed according to one
>     of three equations:
>
>             f = exp(-d*c),                               (3.24)
>             f = exp(-(d*c)^2), or                        (3.25)
>             f = (e-c)/(e-s)                              (3.26)
>
>     If vertex program mode is enabled or if the fog source (as defined below)
>     is FOG_COORDINATE_EXT, then c is the fragment's fog coordinate.
>     Otherwise, the c is the eye-coordinate distance from the eye, (0,0,0,1) in
>     eye-coordinates, to the fragment center. ...


Henri

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to