Home | History | Annotate | Download | only in tnl

Lines Matching refs:Fog

88  * Compute per-vertex fog blend factors from fog coordinates by
89 * evaluating the GL_LINEAR, GL_EXP or GL_EXP2 fog function.
90 * Fog coordinates are distances from the eye (typically between the
94 * Fog blend factors are in the range [0,1].
99 GLfloat end = ctx->Fog.End;
109 switch (ctx->Fog.Mode) {
111 if (ctx->Fog.Start == ctx->Fog.End)
114 d = 1.0F / (ctx->Fog.End - ctx->Fog.Start);
122 d = ctx->Fog.Density;
129 d = ctx->Fog.Density*ctx->Fog.Density;
136 _mesa_problem(ctx, "Bad fog mode in make_fog_coord");
151 if (!ctx->Fog.Enabled)
154 if (ctx->Fog.FogCoordinateSource == GL_FRAGMENT_DEPTH_EXT && !ctx->VertexProgram._Current) {
157 /* Fog is computed from vertex or fragment Z values */
159 /* dest = VB->AttribPtr[_TNL_ATTRIB_FOG] = fog stage private storage */
163 /* compute fog coords from object coords */
194 /* fog coordinates = eye Z coordinates - need to copy for ABS */
214 * before glBegin. But we need to compute fog for all vertices.
222 /* compute blend factors from fog coordinates */
226 /* results = incoming fog coords (compute fog per-fragment later) */
270 "build fog coordinates", /* name */