/[gzz]/manuscripts/AGPU/irregu.txt
ViewVC logotype

Diff of /manuscripts/AGPU/irregu.txt

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

revision 1.6 by jvk, Thu Apr 10 11:05:48 2003 UTC revision 1.7 by tjl, Sat Apr 12 12:51:51 2003 UTC
# Line 8  to the ubiquitous rectangular frames in Line 8  to the ubiquitous rectangular frames in
8  we figuratively tear a piece off the large canvas instead of presenting  we figuratively tear a piece off the large canvas instead of presenting
9  a framed view (window) to it[Fig.2].  a framed view (window) to it[Fig.2].
10    
11    
12    Shape
13    -----
14    
15  In order to maintain the illusion, the animation has to be appropriate:  In order to maintain the illusion, the animation has to be appropriate:
16  having the shape of the jagged edge remain while the viewport moves over  having the shape of the jagged edge remain while the viewport moves over
17  the canvas would still *feel* like a window. The shape of the jagged  the canvas would still *feel* like a window. The shape of the jagged
18  edge must be tied to the location on the background[Fig.3].  edge must be tied to the location on the background[Fig.3].
19    
 XXX:  
 - only need texture_env_add which is included in OpenGL 1.3  
 - no more accuracy with NV10  
 - less accuracy without texture_env_add (using horrible projective  
   color interpolation (which the spec does not require to be  
   implemented) hack to compensate the nonlinearity of texenv_modulate)  
 - improved shapes?  
   
20  We show how the GPU can be used to accomplish this - this is the easy  We show how the GPU can be used to accomplish this - this is the easy
21  part and we can even do this on unextended OpenGL 1.3 (XXX jvk!),  part and we can even do this on unextended OpenGL 1.3.  
22  although the flexibility of the NV10 architecture allows us to obtain  To draw a segment of the irregular shape, we draw a single polygon
23  some more accuracy and improved shapes. The technique is simple:  that envelopes the edge on both the inside and outside.
24  we tie the texture coordinates to the canvas inside (two different  The texture coordinates are tied to the canvas coordinates.
25  ways to do this for different appearance in the results - completely  They can be tied directly, in which case we get the "sprinkled" edge,
26  connected or with pieces of the shape separating from the edge) and  i.e. pieces of the shape "break off" the edge,
27  draw smoothly interpolated polygons with a different color inside and  or they can be tied so that the texture coordinates are the canvas
28  outside of the viewport. The pixel pipeline is coaxed to combining the  coordinates on a line parallel to the edge segment, in which case
29    the edge shape is a "height graph" of the texture at the line.
30    Both of these texture coordinate binding styles share the same, correct
31    style of motion tied to the canvas.
32    
33    The polygon's color is
34    smoothly interpolated with a different color on the inside and
35    outside edge. The pixel pipeline is used to combine the
36  interpolated value and the texture value into a single alpha value.  interpolated value and the texture value into a single alpha value.
 --- XXX: is the previous sentence syntactically correct?.  
37  Because the alpha test is performed prior to the stencil test, we can  Because the alpha test is performed prior to the stencil test, we can
38  create the shape by rejecting fragments with the alpha test and drawing  create the shape by rejecting fragments with the alpha test and drawing
39  the remaining shape into the stencil buffer.  Once the shape is in the  the remaining shape into the stencil buffer.  Once the shape is in the
40  stencil buffer, it can be used as a viewport for any graphics.  stencil buffer, it can be used as a viewport for any graphics.
41    
42    Edge
43    ----
44    
45  The more difficult part to do efficiently is the rendering of the black  The more difficult part to do efficiently is the rendering of the black
46  non-photorealistic edge of the viewport. The problem is that we need the  non-photorealistic edge of the viewport. The problem is that we need the
47  edge to be of a constant thickness so just offsetting it in one direction  edge to be of a constant thickness so just offsetting it in one direction
48  will not suffice. The old trick is of course drawing the original shape  will not suffice. The old trick is of course drawing the original shape
49  several times, slightly shifted, but this is relatively inefficient.  several times, slightly shifted, but this is relatively inefficient.
50    
51  We present several approximative algorithms which are able to draw the  We present several approximative algorithms which are able to draw the
52  required shape in one pass. The algorithms require various levels of  required shape in one pass. The algorithms require various levels of
53  hardware flexibility - ranging from dot products to NV25 offset textures.  hardware flexibility - ranging from dot products to NV25 offset textures
54  (and if we obtain our NV30 and NV34 cards in time, we'll also discuss  (where we have an interesting mipmapping hack) to NV30 flexible
55  the possibilities there).  texture accesses and filtering.
56    
57    Summary
58    -------
59    
60  The core of this proposal is in the original use of texture coordinates  The most novel ideas in this proposal are the original use of texture coordinates
61  to obtain the connected shape, the generation of the shapes from the  to obtain the connected shape, the generation of the shapes from the
62  interpolated color and alpha, and the rendering of the edges of constant  interpolated color and alpha, and the methods for rendering of the edges of constant
63  thicnkess.  Together, the generation of the shapes and drawing of the edge  thicnkess.  Together, the generation of the shapes and drawing of the edge
64  explain several details of the capabilities of the fragment pipelines  explain several details of the capabilities of the fragment pipelines
65  of different levels of hardware and how to accomplish better results in  of different levels of hardware and how to accomplish better results in
# Line 60  The line algorithms are immediately appl Line 69  The line algorithms are immediately appl
69  edge to any shape that is obtained programmatically from textures.  edge to any shape that is obtained programmatically from textures.
70    
71  Our current implementations are OpenGL1.3 with NV extensions but we  Our current implementations are OpenGL1.3 with NV extensions but we
72  can easily rewrite them using Cg.  can easily rewrite them using Cg if desired.
73    
74  --- Figures  --- Figures
75    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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