/[gzz]/gzz/Documentation/Manuscripts/Irregu/irregu.tex
ViewVC logotype

Diff of /gzz/Documentation/Manuscripts/Irregu/irregu.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.109 by tjl, Sat Nov 30 10:39:23 2002 UTC revision 1.110 by tjl, Sat Nov 30 10:42:02 2002 UTC
# Line 595  falls off linearly with distance. The ha Line 595  falls off linearly with distance. The ha
595  the value of such a texture and a noise texture and using that (through  the value of such a texture and a noise texture and using that (through
596  alpha test) as a condition for drawing the fragment.  alpha test) as a condition for drawing the fragment.
597    
598    [ XXX: OpenGL 1.3 or GL\_EXT\_texture\_env\_add required ]
599    
600  We stress that this implementation is not necessarily any worse than  We stress that this implementation is not necessarily any worse than
601  the offset texture implementation:  the offset texture implementation:
602  all its effects are within the options described in Section~\ref{secoptions}.  all its effects are within the options described in Section~\ref{secoptions}.
# Line 604  the smooth shading interpolation in Open Line 606  the smooth shading interpolation in Open
606  falling value, to avoid using the second texture unit and rendering  falling value, to avoid using the second texture unit and rendering
607  the shape to a texture.  the shape to a texture.
608    
609  To obtain ebbing with displacement mapping, a similar approach  To obtain ebbing with a kind of displacement mapping, a similar approach
610  can be used  can be used: instead of accessing the noise texture at the pixel
611    location of the paper, the noise texture is accessed at the location
612  The shape is given by Eq.~(\ref{eq:inside}), which under the  of the undistorted edge. This
613  assumptions can be written as a point $(x,y)$ being inside the tearout,  
614  iff  % The shape is given by Eq.~(\ref{eq:inside}), which under the
615  \[  % assumptions can be written as a point $(x,y)$ being inside the tearout,
616      f(x,g(y)) + (1-y) \ge 1,  % iff
617  \]  % \[
618  where $g(y) = y$ or $g(y) = 1/2$.  %     f(x,g(y)) + (1-y) \ge 1,
619  We can draw the section of the envelope as a single rectangle  % \]
620  with texture coordinates interpolated as $(x,g(y))$  % where $g(y) = y$ or $g(y) = 1/2$.
621  and the alpha component of the primary color as $(1-y)$.  % We can draw the section of the envelope as a single rectangle
622  The left side of the inequality can be computed using  % with texture coordinates interpolated as $(x,g(y))$
623  texture environment mode ADD and an INTENSITY texture storing $f(\p)$.  % and the alpha component of the primary color as $(1-y)$.
624  The alpha output of the texture environment can then be tested  
625  against $1$ using ALPHA\_TEST to discard fragments outside  % The left side of the inequality can be computed using
626  the tear-out.  % texture environment mode ADD and an INTENSITY texture storing $f(\p)$.
627    % The alpha output of the texture environment can then be tested
628  [ XXX: OpenGL 1.3 or GL\_EXT\_texture\_env\_add required ]  % against $1$ using ALPHA\_TEST to discard fragments outside
629    % the tear-out.
630  Using two texture units and register combiners,  
631  it is also possible to compute the generalized case given by  % Using two texture units and register combiners,
632  Eq.~(\ref{eq:inside2}) with interpolation parameter of the  % it is also possible to compute the generalized case given by
633  form $\alpha(y) = a y + b$.  % Eq.~(\ref{eq:inside2}) with interpolation parameter of the
634  This formulation also allows an infinite non-repeating area of  % form $\alpha(y) = a y + b$.
635  different shapes by making  % This formulation also allows an infinite non-repeating area of
636  the ripple functions $f_1$ and $f_2$ repeat at non-rationally  % different shapes by making
637  related periods.  % the ripple functions $f_1$ and $f_2$ repeat at non-rationally
638  On the other hand, the generalized formulation brakes most of the border  % related periods.
639  drawing algorithms discussed below.  % On the other hand, the generalized formulation brakes most of the border
640    % drawing algorithms discussed below.
   
 \if0  
 \subsection{A shape with the correct type of motion}  
   
 Drawing a shape with the correct properties is relatively  
 simple: drawing a single polygon with $\alpha=0$ at $x=0$ and  
 $\alpha=1$ at $x=1$, using ALPHA\_TEST with the cutoff set close to one,  
 and adding a texture value to the incoming fragment alpha value  
 achieves this.  
   
 The texture coordinates determine whether the edge will be attached  
 or sprinkled: for sprinkled edges, simply use the current point's  
 paper coordinates as texture coordinates. For attached edges,  
 project the points to a line at $x=.5$ along the $x$-axis  
 and use those texture coordinates.  
 \fi  
641    
 IMAGE  
642    
643  \subsection{Drawing the edge}  \subsection{Drawing the edge}
644    

Legend:
Removed from v.1.109  
changed lines
  Added in v.1.110

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26