15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    SGIX_fog_scale
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_SGIX_fog_scale
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    $Date: 1999/04/02 22:52:37 $ $Revision: 1.6 $
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    161
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    OpenGL 1.0 is required.
205bd8deadSopenharmony_ci    The extension is written against the OpenGL 1.2.1 Specification.
215bd8deadSopenharmony_ci    SGIX_fog_offset affects the definition of this extension
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciOverview
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    This extension allows fragments to receive more or less fog than the
265bd8deadSopenharmony_ci    amount specified by the fog environment and the distance to the
275bd8deadSopenharmony_ci    fragment center, by scaling the fragment eye-coordinate distance
285bd8deadSopenharmony_ci    prior to fog computation.
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    This is particularly interesting for light point objects that punch
315bd8deadSopenharmony_ci    even through thick fog. Fog scale value is specified by setting the
325bd8deadSopenharmony_ci    FOG_SCALE_VALUE_SGIX scale parameter with glFog*. If scale <= 0, the
335bd8deadSopenharmony_ci    resulting operation is clamped to 0. If 0 < scale < 1, the object
345bd8deadSopenharmony_ci    appears brighter. If scale > 1, the object receives more fog. A
355bd8deadSopenharmony_ci    scale of 1 has no effect. Fog scale can be enabled or disabled with
365bd8deadSopenharmony_ci    the FOG_SCALE_SGIX parameter.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ciIssues
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    * Should specifying FOG_SCALE_VALUE_SGIX < 0 generate an error?
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    * Should the correct combined equation be (z * scale) - offset, or
435bd8deadSopenharmony_ci      (z - offset) * scale? Performer uses the latter, but the former is
445bd8deadSopenharmony_ci      more consistent with other OpenGL scale and bias operations.
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ciNew Procedures and Functions
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    None
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ciNew Tokens
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    Accepted by the <cap> parameter of Enable, Disable, and IsEnabled
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci	FOG_SCALE_SGIX			0x81FC
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
585bd8deadSopenharmony_ci    GetFloatv, and GetDoublev, and by the <pname> parameter of Fogiv and
595bd8deadSopenharmony_ci    Fogfv:
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ci	FOG_SCALE_VALUE_SGIX		0x81FD
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2.1 Specification (OpenGL Operation)
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    None
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2.1 Specification (Rasterization)
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci  - (3.10, p. 139) Change the second paragraph to:
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci	"This factor f is computed according to one of three equations:
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ci	    f = exp(-d * f_z),		    (3.24)
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci	    f = exp(-(d * f_z)^2), or	    (3.25)
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci		e - f_z
785bd8deadSopenharmony_ci	    f = -------			    (3.26)
795bd8deadSopenharmony_ci		e - s
805bd8deadSopenharmony_ci
815bd8deadSopenharmony_ci	f_z is a function of the eye-coordinate distance z from the eye,
825bd8deadSopenharmony_ci	(0,0,0,1) in eye coordinates, to the fragment center. If
835bd8deadSopenharmony_ci	FOG_SCALE_SGIX is enabled, then f_z = z * f_s; otherwise, f_z =
845bd8deadSopenharmony_ci	z. If f_z < 0, then it is clamped to zero prior to fog
855bd8deadSopenharmony_ci	computation.
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ci	"The equation, along with the parameters d, e, s, and f_s, is
885bd8deadSopenharmony_ci	specified with..."
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci    Change the end of the third paragraph to:
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci	"...If <pname> is FOG_DENSITY, FOG_START, FOG_END, or
935bd8deadSopenharmony_ci	FOG_SCALE_SGIX, then <param> is or <params> points to a value
945bd8deadSopenharmony_ci	that is d, s, e, or f_s, respectively. If d is specified as less
955bd8deadSopenharmony_ci	than zero, the error INVALID_VALUE is generated."
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci    Change the final paragraph on page 140 to:
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ci	"The state required for fog consists of a three valued integer
1005bd8deadSopenharmony_ci	to select the fog equation, four floating-point values d, e, s,
1015bd8deadSopenharmony_ci	and f_s, an RGBA fog color and a fog color index, a single bit
1025bd8deadSopenharmony_ci	to indicate whether or not fog is enabled, and a single bit to
1035bd8deadSopenharmony_ci	indicate whether or not fog scaling is enabled. In the initial
1045bd8deadSopenharmony_ci	state, fog is disabled, fog scaling is disabled, FOG_MODE is
1055bd8deadSopenharmony_ci	EXP, d = 1.0, e = 1.0, s = 0.0, and f_s = 1.0; C_f = (0,0,0,0)
1065bd8deadSopenharmony_ci	and i_f = 0."
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2.1 Specification (Per-Fragment Operations
1095bd8deadSopenharmony_ciand the Framebuffer)
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci    None
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2.1 Specification (Special Functions)
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci    None
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2.1 Specification (State and State Requests)
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci    None
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ciAdditions to the GLX Specification
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci    None
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ciDependencies on SGIX_fog_offset
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci    If SGIX_fog_offset is supported, then both scale and offset can be
1285bd8deadSopenharmony_ci    applied to z prior to fog computation. Combining the new language of
1295bd8deadSopenharmony_ci    the two specifications is straightforward except at the end of the
1305bd8deadSopenharmony_ci    second paragraph of section 3.10, which should read:
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci	"...f_z is a function of the eye-coordinate distance z from the
1335bd8deadSopenharmony_ci	eye, (0,0,0,1) in eye coordinates, to the fragment center. If
1345bd8deadSopenharmony_ci	both FOG_OFFSET_SGIX and FOG_SCALE_SGIX are enabled, then f_z =
1355bd8deadSopenharmony_ci	z * f_s - f_o. If only FOG_OFFSET_SGIX is enabled, then f_z = z
1365bd8deadSopenharmony_ci	- f_o. If only FOG_SCALE_SGIX is enabled, then f_z = z * f_s.
1375bd8deadSopenharmony_ci	Otherwise, f_z = z. If f_z < 0, then it is clamped to zero prior
1385bd8deadSopenharmony_ci	to fog computation."
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ciErrors
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    None
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ciNew State
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci    (table 6.8, p. 198)
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci    Get Value		    Type    Get Command     Initial Value   Description			    Sec.   Attribute
1495bd8deadSopenharmony_ci    ---------		    ----    -----------     -------------   -----------			    ----   ---------
1505bd8deadSopenharmony_ci    FOG_SCALE_SGIX	    B	    IsEnabled	    False	    True if fog scaling is enabled  3.10   fog
1515bd8deadSopenharmony_ci    FOG_SCALE_VALUE_SGIX    R	    GetFloatv	    1.0		    Fog scaling factor		    3.10   fog
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ciNew Implementation Dependent State
1545bd8deadSopenharmony_ci
1555bd8deadSopenharmony_ci    None
156