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 |
|
|
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. |
part and we can even do this on unextended OpenGL 1.3. To draw a segment |
22 |
To draw a segment of the irregular shape, we draw a single polygon |
of the irregular shape, we draw a single polygon that envelopes the edge |
23 |
that envelopes the edge on both the inside and outside. |
on both the inside and outside. The texture coordinates are tied to the |
24 |
The texture coordinates are tied to the canvas coordinates. |
canvas coordinates. They can be tied directly, in which case we get the |
25 |
They can be tied directly, in which case we get the "sprinkled" edge, |
"sprinkled" edge, i.e. pieces of the shape "break off" the edge, or they |
26 |
i.e. pieces of the shape "break off" the edge, |
can be tied so that the texture coordinates are the canvas coordinates |
27 |
or they can be tied so that the texture coordinates are the canvas |
on a line parallel to the edge segment, in which case the edge shape |
28 |
coordinates on a line parallel to the edge segment, in which case |
is a "height graph" of the texture at the line. Both of these texture |
29 |
the edge shape is a "height graph" of the texture at the line. |
coordinate binding styles share the same, correct style of motion tied |
30 |
Both of these texture coordinate binding styles share the same, correct |
to the canvas. |
31 |
style of motion tied to the canvas. |
|
32 |
|
The polygon's color is smoothly interpolated with a different color on |
33 |
The polygon's color is |
the inside and outside edge. The pixel pipeline is used to combine the |
|
smoothly interpolated with a different color on the inside and |
|
|
outside edge. The pixel pipeline is used to combine the |
|
34 |
interpolated value and the texture value into a single alpha value. |
interpolated value and the texture value into a single alpha value. |
35 |
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 |
36 |
create the shape by rejecting fragments with the alpha test and drawing |
create the shape by rejecting fragments with the alpha test and drawing |
37 |
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 |
38 |
stencil buffer, it can be used as a viewport for any graphics. |
stencil buffer, it can be used as a viewport for any graphics. |
39 |
|
|
40 |
|
Because the shape is drawn completely on the GPU, with only one texture |
41 |
|
access in the basic algorithm, drawing it is fast and thus we have |
42 |
|
a smooth animation. |
43 |
|
|
44 |
Edge |
Edge |
45 |
---- |
---- |
46 |
|
|
59 |
Summary |
Summary |
60 |
------- |
------- |
61 |
|
|
62 |
The most novel ideas in this proposal are the original use of texture coordinates |
The most novel ideas in this proposal are the original use of texture |
63 |
to obtain the connected shape, the generation of the shapes from the |
coordinates to obtain the connected shape, the generation of the shapes |
64 |
interpolated color and alpha, and the methods for rendering of the edges of constant |
from the interpolated color and alpha, and the methods for rendering of |
65 |
thicnkess. Together, the generation of the shapes and drawing of the edge |
the edges of constant thicnkess. Together, the generation of the shapes |
66 |
explain several details of the capabilities of the fragment pipelines |
and drawing of the edge explain several details of the capabilities |
67 |
of different levels of hardware and how to accomplish better results in |
of the fragment pipelines of different levels of hardware and how to |
68 |
this task using them. |
accomplish better results in this task using them. |
69 |
|
|
70 |
The line algorithms are immediately applicable by anyone wishing to draw an |
The edge algorithms are immediately applicable by anyone wishing to draw an |
71 |
edge to any shape that is obtained programmatically from textures. |
edge to a shape that is obtained programmatically from textures. |
72 |
|
|
73 |
Our current implementations are OpenGL1.3 with NV extensions but we |
Our current implementations are OpenGL1.3 with NV extensions but we |
74 |
can easily rewrite them using Cg if desired. |
can easily rewrite them using Cg if desired. |
89 |
where it was a moment ago". Obtaining |
where it was a moment ago". Obtaining |
90 |
|
|
91 |
XXX how to explain the intricate edge-drawing algorithms here? |
XXX how to explain the intricate edge-drawing algorithms here? |
92 |
|
JVK! |
93 |
|
|
94 |
|
|