22 |
\title{Stretch-Squish Improves Image Quality on Hardware Accelerators: |
\title{Stretch-Squish Improves Image Quality on Hardware Accelerators: |
23 |
Why You Should Make 2D Isotropic Situations Anisotropic} |
Why You Should Make 2D Isotropic Situations Anisotropic} |
24 |
|
|
25 |
\author{Tuomas J. Lukka and Janne Kujala} |
\author{Tuomas J. Lukka and Janne V. Kujala} |
26 |
\maketitle |
\maketitle |
27 |
|
|
28 |
\begin{abstract} |
\begin{abstract} |
53 |
primitive\cite{heckbert86survey,haeberli93texture} |
primitive\cite{heckbert86survey,haeberli93texture} |
54 |
originally introduced in \cite{catmull74}. |
originally introduced in \cite{catmull74}. |
55 |
In off-line rendering, good algorithms for calculating |
In off-line rendering, good algorithms for calculating |
56 |
pixel values by a weighted numerically integral of the texels falling |
pixel values by a weighted numerical integral of the texels falling |
57 |
inside a pixel have been known for a long time(XXX EWAREF). |
inside a pixel have been known for a long time(XXX EWAREF). |
58 |
On the other hand, in real-time rendering through |
On the other hand, in real-time rendering through |
59 |
hardware-accelerators, it is important that the number of samples can be |
hardware-accelerators, it is important that the number of samples can be |
63 |
was designed to avoid temporal and spatial aliasing while only requiring 8 |
was designed to avoid temporal and spatial aliasing while only requiring 8 |
64 |
texture samples per pixel. |
texture samples per pixel. |
65 |
For 3D rendering, the most well-known problem of |
For 3D rendering, the most well-known problem of |
66 |
trilinear filtering is that it blurs the texture the pixel footprint in texture space |
trilinear filtering is that it blurs the texture when the pixel footprint in texture space |
67 |
is far from square, i.e., in \emph{anisotropic} situations |
is far from square, i.e., in \emph{anisotropic} situations |
68 |
(squished more in one direction than in another). |
(squished more in one direction than in another). |
69 |
This has led to the development of several anisotropic filtering algorithms(REFS feline texram talisman spaf ffp...) |
This has led to the development of several anisotropic filtering algorithms(REFS feline texram talisman spaf ffp...) |
70 |
that usually work through some type of |
that usually work through some type of |
71 |
\emph{footprint assembly}, i.e. assembling a better approximation |
\emph{footprint assembly}, i.e. assembling a better approximation |
72 |
to the pixel footprint in texture space from normal mipmap samples or by using |
to the pixel footprint in texture space from normal mipmap samples or by using |
73 |
trilinear \emph{probes}. |
trilinear \emph{probes}. %probes? |
74 |
|
|
75 |
While summed-area tables(XXX CROWREF) can often provide |
While summed-area tables(XXX CROWREF) can often provide |
76 |
better rendering quality, their hardware implementation is not easy, as discussed in |
better rendering quality, their hardware implementation is not easy, as discussed in |
77 |
|
% isn't it not even applicable to rotated mappings?! |
78 |
|
% so ``today ...'' below doesn't seem to follow from the above |
79 |
(XXX ref to fast footprint/... discussing this), so today trilinear rendering, supplemented |
(XXX ref to fast footprint/... discussing this), so today trilinear rendering, supplemented |
80 |
with some form of anisotropic filtering |
with some form of anisotropic filtering |
81 |
is the \emph{de facto} standard in hardware accelerators, supplemented by |
is the \emph{de facto} standard in hardware accelerators, supplemented by |
119 |
is much larger in the vertical direction than it should be. |
is much larger in the vertical direction than it should be. |
120 |
The two highlighted diagrams are the ones relevant to understanding stretch-squish. |
The two highlighted diagrams are the ones relevant to understanding stretch-squish. |
121 |
} |
} |
122 |
|
% Should we use the same orientation in both iso and aniso case so that |
123 |
|
% the strech-squish imporvement could be directly assessed? |
124 |
|
% Perhaps the difference should be explained in the caption as |
125 |
|
% the aniso/tri+aniso cannot be obviosly seen as better than iso/trilinear. |
126 |
\end{figure*} |
\end{figure*} |
127 |
|
|
128 |
|
|
138 |
we found pixel footprint in screen space (PFSS) diagrams |
we found pixel footprint in screen space (PFSS) diagrams |
139 |
extremely useful, contrary to the usual practice in the |
extremely useful, contrary to the usual practice in the |
140 |
texture filtering literature to |
texture filtering literature to |
141 |
visualize the pixel footprint is exclusively in the texture space. |
visualize the pixel footprint exclusively in the texture space. |
142 |
Our PFSS diagrams show a highly magnified pixel (e.g. 100 pixels in side) |
Our PFSS diagrams show a highly magnified pixel (e.g. 100 pixels in side) |
143 |
|
% 100 pixels in side? 100x mag? |
144 |
and the contributions (assuming box filtering for the mipmap levels) |
and the contributions (assuming box filtering for the mipmap levels) |
145 |
from the texels mapped to the surrounding area by a color. |
from the texels mapped to the surrounding area by a color. |
146 |
Figure~\ref{figallpfss} shows |
Figure~\ref{figallpfss} shows |
177 |
number of samples from textures and cannot be easily implemented on current hardware.. |
number of samples from textures and cannot be easily implemented on current hardware.. |
178 |
Summed-area tables\cite{crow84summedareatables} could be a great improvement but, |
Summed-area tables\cite{crow84summedareatables} could be a great improvement but, |
179 |
while they can be implemented using fragment programs on some of the current hardware, |
while they can be implemented using fragment programs on some of the current hardware, |
180 |
are rather slow in such an implementation. |
are rather slow in such an implementation. % ref? |
181 |
|
|
182 |
A conventional way to obtain blurring or sharpening |
A conventional way to obtain blurring or sharpening |
183 |
blurring artifacts is to use a |
blurring artifacts is to use a |
195 |
to anisotropic filtering using unextended OpenGL |
to anisotropic filtering using unextended OpenGL |
196 |
given in \cite{olano01vertexbasedaniso} |
given in \cite{olano01vertexbasedaniso} |
197 |
to supersampling by adjusting the texture coordinates in screen space. |
to supersampling by adjusting the texture coordinates in screen space. |
198 |
|
% the above is ambiguous ``the approach to anisotropic filtering'' |
199 |
However, this approach does restrict the OpenGL texture environment |
However, this approach does restrict the OpenGL texture environment |
200 |
and blend modes available unless the hardware supports enough texture |
and blend modes available unless the hardware supports enough texture |
201 |
accesses to accomplish the complete operation in one pass (e.g., 4 for 2x2 supersampling). |
accesses to accomplish the complete operation in one pass (e.g., 4 for 2x2 supersampling). |
212 |
The Advanced OpenGL course notes(XXX REF) suggest ``generating the mipmap levels carefully, e.g. XXX''. |
The Advanced OpenGL course notes(XXX REF) suggest ``generating the mipmap levels carefully, e.g. XXX''. |
213 |
This appears to be largely unexplored territory and seems to be, in any case, orthogonal |
This appears to be largely unexplored territory and seems to be, in any case, orthogonal |
214 |
to the improvements in the actual filtering methods. |
to the improvements in the actual filtering methods. |
215 |
|
% is orthogonoal in the opengl functionality sense generally understood? |
216 |
|
|
217 |
\section{Stretch and squish improves image quality} |
\section{Stretch and squish improves image quality} |
218 |
|
|
250 |
an isotropic texture. This is shown in detail in Fig.~\ref{figstretchsquishwhyworks}. |
an isotropic texture. This is shown in detail in Fig.~\ref{figstretchsquishwhyworks}. |
251 |
The trilinear filter footpring size depends strongly on subpixel position and |
The trilinear filter footpring size depends strongly on subpixel position and |
252 |
can be quite large compared to the actual pixel, causing blurring. |
can be quite large compared to the actual pixel, causing blurring. |
253 |
When using the anisotropic filter, the footprint is remains significantly smaller |
When using the anisotropic filter, the footprint remains significantly smaller |
254 |
in one direction regardless of subpixel shifting --- in the other direction, |
in one direction regardless of subpixel shifting --- in the other direction, |
255 |
it is similar. |
it is similar. |
256 |
|
|
275 |
\caption{ |
\caption{ |
276 |
\label{figexamples} |
\label{figexamples} |
277 |
Magnified examples of text filtered using several algorithms. |
Magnified examples of text filtered using several algorithms. |
278 |
|
% Hard to assess quality if zoomed too much (if the pixels are clearly |
279 |
|
% visible, the grid structure will obscure the actual image). |
280 |
|
% Is this fig referred to? |
281 |
|
|
282 |
} |
} |
283 |
\end{figure*} |
\end{figure*} |
284 |
|
|