fog with pixel shaders < 3.0

H. Verbeet hverbeet at
Mon Mar 12 10:42:34 CDT 2007

On 12/03/07, Stefan Dösinger <stefandoesinger at> wrote:
> With the precalculated No-Fog fog I pass values from [255,0] in the vertex
> attribs. GL fogstart = 255, end = 0, but that is bypassed with pixel shaders.
> Otherwise the Z value is used, which can be in any range. So yes, I think the
> fixed function pipeline can pass any range in. Also we should check how table
> fog really behaves with shaders.
Well, that's what you pass to vertex processing. But I think that what
comes out of vertex processing is already clamped in OpenGL. My reason
for thinking that is that in OpenGL we have to clamp the fog
coordinates in the vertex shader because fixed function fragment
processing doesn't seem to do any clamping.

More information about the wine-devel mailing list