pixel_texture
Specification
Name
SGIX_impact_pixel_texture
Name Strings
GL_SGIX_impact_pixel_texture
Version
$Date: 1996/09/09 00:59:38 $ $Revision: 1.3 $
Number
15
Dependencies
None
Overview
This extension allows the Impact Graphics system to perform pixel texture
operations with 4D textures, and accomplish the fourth interpolation with
a two-pass operation, using the frame-buffer blend. This involves two
new filter functions for the "q" dimension only, ceiling and floor, in
addition to the nearest function, the default on Impact Graphics. Also,
there is an "alpha-shifting" function which prevents loss of precision in
the alpha value used in the frame-buffer blend.
Issues
* Will this extension be needed/utilized by other platforms?
New Procedures and Functions
None
New Tokens
Accepted by the < mode > parameter of PixelTexGenSGIX:
PIXEL_TEX_GEN_Q_CEILING_SGIX
PIXEL_TEX_GEN_Q_FLOOR_SGIX
PIXEL_TEX_GEN_Q_ROUND_SGIX
PIXEL_TEX_GEN_ALPHA_LS_SGIX
PIXEL_TEX_GEN_ALPHA_MS_SGIX
Additions to Chapter 3 of the 1.1 Specification (Rasterization)
This extension, similar to the pixel_texture.spec modifies the
"Conversion to Fragments" subsection of section 3.6.3 (Rasterization
of Pixel Rectangles) of the GL Specification. Immediately following
the text added by the pixel_texture.spec, insert the following:
If the PixelTexGenSGIX mode is RGBA, the Impact graphics system cannot
perform the "q" interpolation, so the correct result can be obtained
by a two-pass operation using the frame-buffer blend to interpolate
the two passes. The two passes use ceiling and floor functions,
specified by calling TexParameter with the minfilter and maxfilter
set to PIXEL_TEX_GEN_Q_CEILING_SGIX and PIXEL_TEX_GEN_Q_FLOOR_SGIX.
These functions can be disabled by calling TexParameter with
PIXEL_TEX_GEN_Q_ROUND_SGIX, the default. To produce the correct
fragment alpha for interpolation, the alpha-replace mode (see above)
is used to replace the texture alpha by the pixel group's alpha
component. This alpha needs to be shifted (scaled) by a value based
on the texture "q" size; this can be done with the texture color table.
For large values an additional shift is possible by calling
PixelTexGenSGIX with PIXEL_TEX_GEN_ALPHA_LS_SGIX. This will send the
least significant 8 bits of a 12-bit alpha to the texture color table.
The default is to send the most significant 8 bits by calling
PixelTexGenSGIX with PIXEL_TEX_GEN_ALPHA_MS_SGIX.
Additions to Chapter 5 of the 1.1 Specification (Special Functions)
None
Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
None
Additions to the GLX Specification
None
Errors
None
New State
Get Value Get Command Type Initial Value Attrib
--------- ----------- ---- ------------- ------
PIXEL_TEX_GEN_Q_CEILING_SGIX GetTexParameter Z3 NONE pixel
PIXEL_TEX_GEN_Q_FLOOR_SGIX GetTexParameter Z3 NONE pixel
PIXEL_TEX_GEN_Q_ROUND_SGIX GetTexParameter Z3 NONE pixel
New Implementation Dependent State
None
Name
SGIX_pixel_texture
Name Strings
GL_SGIX_pixel_texture
Version
$Date: 1996/09/09 00:59:38 $ $Revision: 1.3 $
Number
15
Dependencies
EXT_texture3D is required
SGIS_texture4D is required
Overview
This extension allows the color components of pixel groups to be used as
texture coordinates, effectively converting a color image into a texture
coordinate image. Because texture mapping is essentially a
multidimensional table lookup, this conversion supports multidimensional
color lookups for images. Such multidimensional lookups can be used to
implement very accurate color space conversions.
Issues
* Should LOD be supported?
New Procedures and Functions
void PixelTexGenSGIX(enum mode);
New Tokens
Accepted by the < pname > parameter of GetBooleanv, GetIntegerv,
GetFloatv, and GetDoublev:
PIXEL_TEX_GEN_MODE_SGIX
Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
None
Additions to Chapter 3 of the 1.0 Specification (Rasterization)
This extension modifies the "Conversion to Fragments" subsection of
section 3.6.3 (Rasterization of Pixel Rectangles) of the GL
Specification. The paragraph beginning with "A fragment arising from a
group consisting of color data ..." is replaced by the following:
A fragment arising from a group consisting of color index data takes on
the color index of the group; the depth and texture coordinates are
taken from the current raster position's associated data. Likewise, a
fragment arising from a depth component takes the component's depth
value; the color and texture coordinates are given by those associated
with the current raster position. Groups arising from DrawPixels with a
< format > of STENCIL_INDEX are treated specially and are described in
section 4.3.1.
The treatment of fragments arising from pixel groups is determined by
the PIXEL_TEX_GEN_MODE_SGIX value. PixelTexGenSGIX is used to set this
value to one of NONE, LUMINANCE, LUMINANCE_ALPHA, RGB, or RGBA. (It is
NONE by default.) In all cases a fragment arising from a group consisting
of RGBA color data takes its depth component from the current raster
position's associated data.
If the value is LUMINANCE, there must be a valid 1D texture enabled, which
can have any internal format. The external format of the pixel group must
be LUMINANCE; the luminance component will be used to generate an s texture
coordinate.
If the value is LUMINANCE_ALPHA, there must be a valid 2D texture enabled,
which can have any internal format. The external format of the pixel group
must be LUMINANCE_ALPHA; the luminance and alpha components will be used to
generate s and t texture coordinates, respectively.
If the value is RGB, there must be a valid 3D texture enabled, which can
have any internal format. The external format of the pixel group must be
RGB; the red, green, and blue components will be used to generate s, t and
r texture coordinates, respectively.
If the value is RGBA, there must be a valid 4D texture enabled, which can
have any internal format. The external format of the pixel group must be
RGBA; the red, green, blue, and alpha components will be used to generate
s, t, r, and q texture coordinates, respectively.
When a pixel group color component is assigned to a fragment texture
coordinate, it is as if that color component had undergone only clamping
to [0,1] during final conversion, rather than the clamping and scaling
to framebuffer resolution that is defined by the specification. (See
the "Final Conversion" subsection that immediately precedes the
"Conversion to Fragments" subsection.)
The result of the texture-mapping operation is texture-blended onto
a fragment which has the attributes of the current raster position.
Therefore the desired texture environment mode must be set, based on
the internal format of the texture.
If the PIXEL_TEX_GEN_MODE_SGIX value is LUMINANCE_ALPHA or RGBA,
the alpha component can replace the texture alpha, if any, by calling
PixelTexGenSGIX with the parameter PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX.
This function can be disabled by calling PixelTexGenSGIX with the
parameter PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX, which is the default.
Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
and the Framebuffer)
The operation of PixelTexGenSGIX during pixel copy operations is
identical to the operation during pixel drawing. Because PixelTexGenSGIX
defines the rasterization of pixel groups, it has no effect on texture
definitions or on pixel query (ReadPixels) operations.
Additions to Chapter 5 of the 1.0 Specification (Special Functions)
None
Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
None
Additions to the GLX Specification
None
Errors
INVALID_OPERATION is generated if PixelTexGenSGIX parameter < mode > is not
NONE, LUMINANCE, LUMINANCE_ALPHA, RGB, RGBA, PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX,
PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX.
INVALID_OPERATION is generated if PixelTexGenSGIX is called between
execution of Begin and the corresponding execution of End.
New State
Get Value Get Command Type Initial Value Attrib
--------- ----------- ---- ------------- ------
PIXEL_TEX_GEN_MODE_SGIX GetIntegerv Z3 NONE pixel
New Implementation Dependent State
None