home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / extensions / man / glsharpentexfuncsgis.z / glsharpentexfuncsgis
Encoding:
Text File  |  1996-11-11  |  9.7 KB  |  132 lines

  1.  
  2.  
  3.  
  4. ggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS((((3333GGGG))))       OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee       ggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS - specify sharpen texture scaling function
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      void ggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS( GLenum _t_a_r_g_e_t,
  14.                                 GLsizei _n,
  15.                                 const GLfloat *_p_o_i_n_t_s )
  16.  
  17.  
  18. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  19.      _t_a_r_g_e_t  The target to which the scaling function will be applied.  Must
  20.              be one of GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____1111DDDD, GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____2222DDDD, or GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____3333DDDD____EEEEXXXXTTTT.
  21.  
  22.      _n       The number of scaling function samples in _p_o_i_n_t_s.
  23.  
  24.      _p_o_i_n_t_s  An array of scaling function samples, each of which is a (_l_e_v_e_l-
  25.              _o_f-_d_e_t_a_i_l, _f_u_n_c_t_i_o_n-_v_a_l_u_e) pair.
  26.  
  27. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  28.      The sharpen texture extension defines three additional texture
  29.      magnification filters.  These filters are selected by choosing one of the
  30.      values GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____SSSSGGGGIIIISSSS, GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____AAAALLLLPPPPHHHHAAAA____SSSSGGGGIIIISSSS, or
  31.      GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____CCCCOOOOLLLLOOOORRRR____SSSSGGGGIIIISSSS for the current 1D, 2D, or 3D texture's
  32.      GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____MMMMAAAAGGGG____FFFFIIIILLLLTTTTEEEERRRR.
  33.  
  34.      All three filters sample the level zero texture array exactly as it would
  35.      be sampled with filter mode GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR.  If both texture levels 0 and 1
  36.      are complete, the level 1 array of the texture is also linearly sampled,
  37.      just as though mipmap minification was being performed with _L_O_D (the
  38.      level of detail parameter) valued near 1.0.  If levels 0 and 1 are not
  39.      complete, it is as though the magnification texture filter was GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR.
  40.      (Although querying the magnification filter value will return the value
  41.      as specified.)
  42.  
  43.      The texture value computed from the level 0 array (_T_0) and the value
  44.      computed from the level one array (_T_1) are combined to compute the final
  45.      texture value (_T):
  46.  
  47.         T' = ((1 + F(LOD)) * T0) - (F(LOD) * T1)
  48.  
  49.         T =     0  if T' < 0
  50.                 T' if 0 <= T' <= 1
  51.                 1  if T' > 1
  52.      ggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS is used to specify the scaling function _F.  _t_a_r_g_e_t
  53.      must be GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____1111DDDD, GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____2222DDDD, or GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____3333DDDD____EEEEXXXXTTTT.  _n specifies
  54.      the number of pairs of values in _p_o_i_n_t_s.  _p_o_i_n_t_s points to an array of
  55.      pairs of floating point values.  The first value of each pair specifies a
  56.      value of _L_O_D, and the second value of each pair specifies the correspond-
  57.      ing function value.  The order in which the points are specified is not
  58.      significant.  The _n value pairs in _p_o_i_n_t_s completely specify the
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. ggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS((((3333GGGG))))       OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee       ggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS((((3333GGGG))))
  69.  
  70.  
  71.  
  72.      function, replacing any previous specification that may have existed.
  73.  
  74.      The function _F is evaluated by fitting a curve through the sample points
  75.      specified in _p_o_i_n_t_s.  This curve may be linear between adjacent points,
  76.      or it may be smoothed, but it will pass exactly through the points, lim-
  77.      ited only by the resolution of the implementation.  The value pair with
  78.      the lowest _L_O_D value specifies the function value _F for all values of _L_O_D
  79.      less than or equal to that pair's _L_O_D.  Likewise, the value pair with the
  80.      greatest _L_O_D value specifies the function value _F for all values of _L_O_D
  81.      greater than or equal to that pair's _L_O_D.
  82.  
  83.      Note that negative values of LOD correspond to magnification, and posi-
  84.      tive values correspond to minification.  Hence, an LOD of -4 corresponds
  85.      to a magnification by a factor of 2**4, or 16.  The default function
  86.      points are (0,0) and (-4,1).
  87.  
  88.      If the texture magnification filter is GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____SSSSGGGGIIIISSSS, then both
  89.      the color and the alpha components of _T are computed as described in the
  90.      equations above.  If the filter is GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____CCCCOOOOLLLLOOOORRRR____SSSSGGGGIIIISSSS, then all
  91.      components of _T other than alpha are computed as described above, and the
  92.      alpha component of _T is computed as if the texture magnification filter
  93.      were GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR.  Finally, if the filter is GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____AAAALLLLPPPPHHHHAAAA____SSSSGGGGIIIISSSS,
  94.      the alpha component of _T is computed as described in the equations above,
  95.      and all other components of _T are computed as if the texture magnifica-
  96.      tion filter were GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR.
  97.  
  98. EEEERRRRRRRROOOORRRRSSSS
  99.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_a_r_g_e_t is not one of the allowable
  100.      values.
  101.  
  102.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _n is negative.
  103.  
  104.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS is executed
  105.      between the execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of
  106.      ggggllllEEEEnnnndddd.
  107.  
  108. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  109.      ggggllllGGGGeeeettttTTTTeeeexxxxPPPPaaaarrrraaaammmmeeeetttteeeerrrr, ggggllllGGGGeeeettttSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS.
  110.  
  111.  
  112. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  113.      Sharpen texturing is supported only on RealityEngine, RealityEngine2, and
  114.      VTX systems.  However, on these systems it may not be used with 3D tex-
  115.      tures or when rendering to pixmaps.
  116.  
  117.  
  118. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  119.      ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee1111DDDD, ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee2222DDDD, ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDDEEEEXXXXTTTT, ggggllllTTTTeeeexxxxPPPPaaaarrrraaaammmmeeeetttteeeerrrr,
  120.      ggggllllTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT.
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                                                         PPPPaaaaggggeeee 2222
  128.  
  129.  
  130.  
  131.