gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] manuscripts/AniFont anifont.tex


From: Janne V. Kujala
Subject: [Gzz-commits] manuscripts/AniFont anifont.tex
Date: Tue, 14 Oct 2003 10:21:39 -0400

CVSROOT:        /cvsroot/gzz
Module name:    manuscripts
Branch:         
Changes by:     Janne V. Kujala <address@hidden>        03/10/14 10:21:39

Modified files:
        AniFont        : anifont.tex 

Log message:
        add anisoprobe pseudocode

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/manuscripts/AniFont/anifont.tex.diff?tr1=1.9&tr2=1.10&r1=text&r2=text

Patches:
Index: manuscripts/AniFont/anifont.tex
diff -u manuscripts/AniFont/anifont.tex:1.9 manuscripts/AniFont/anifont.tex:1.10
--- manuscripts/AniFont/anifont.tex:1.9 Tue Oct 14 09:01:26 2003
+++ manuscripts/AniFont/anifont.tex     Tue Oct 14 10:21:38 2003
@@ -249,4 +249,47 @@
       the assumption of generating the mipmap levels in the usual way
 
 
+\appendix
+
+\section{Probing texture filters}
+
+\begin{enumerate}
+
+\item Initialize and bind a texture with all texels set to 0.5 and
+      set the desired texture parameters (TEXTURE\_MIN\_FILTER, etc.).
+
+\item Initialize the PROJECTION and MODELVIEW matrices for a pixel-based 
+      parallel projection, and set MATRIXMODE to MODELVIEW.
+
+\item Create display lists \texttt{quad} and \texttt{probe} and compile 
+the list \texttt{probe} with the code
+\begin{verbatim}
+    TexSubImage2D TEXTURE_2D i x y 1 1 RGBA FLOAT 1.0 1.0 1.0 1.0
+    PushMatrix
+    Translate (x + i * 2**n) y 0
+    CallList quad
+    PopMatrix
+    TexSubImage2D TEXTURE_2D i x y 1 1 RGBA FLOAT 0.5 0.5 0.5 0.5
+\end{verbatim}
+concatenated for all integers $x, y, i$ satisfying 
+$0 \le x, y < 2^{n-i}$, $0 \le i < n$.
+
+\item\label{code:quad}
+      Compile the list \texttt{quad} with code that draws the pixel
+      to be probed as a quad at the coordinates (0,0) - (1,1) 
+      (with the texture coordinates correctly set).
+
+\item Call \texttt{probe} to draw the texel contributions. Pixels
+      with values over 0.5 correspond to positive contributions and
+      pixels with values less than 0.5 correspond to negative contributions.
+
+\item Repeat from \ref{code:quad} to probe different 
+      texture-to-screen mappings.
+
+\end{enumerate}
+
+Note that only the display list \texttt{quad} need to be changed
+for probing different texture-to-screen mappings or, even more easily,
+one can simply change the texture-matrix while using a static quad.
+
 \end{document}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]