Template:Glapi texture comparison funcs: Difference between revisions
Jump to navigation
Jump to search
template for GLAPI. |
Table fix. |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{| | {| | ||
| | |- | ||
! '''Texture Comparison Function''' | ! '''Texture Comparison Function''' | ||
! '''Computed result''' | ! '''Computed result''' | ||
| | |- | ||
| {{ | | {{enum|GL_LEQUAL}} | ||
| <math>result = | | <math>result = | ||
\begin{cases} | \begin{cases} | ||
Line 10: | Line 10: | ||
0.0, & r > D_t | 0.0, & r > D_t | ||
\end{cases}</math> | \end{cases}</math> | ||
| | |- | ||
| {{ | | {{enum|GL_GEQUAL}} | ||
| <math>result = | | <math>result = | ||
\begin{cases} | \begin{cases} | ||
Line 17: | Line 17: | ||
0.0, & r < D_t | 0.0, & r < D_t | ||
\end{cases}</math> | \end{cases}</math> | ||
| | |- | ||
| {{ | | {{enum|GL_LESS}} | ||
| <math>result = | | <math>result = | ||
\begin{cases} | \begin{cases} | ||
Line 24: | Line 24: | ||
0.0, & r \ge D_t | 0.0, & r \ge D_t | ||
\end{cases}</math> | \end{cases}</math> | ||
| | |- | ||
| {{ | | {{enum|GL_GREATER}} | ||
| <math>result = | | <math>result = | ||
\begin{cases} | \begin{cases} | ||
Line 31: | Line 31: | ||
0.0, & r \le D_t | 0.0, & r \le D_t | ||
\end{cases}</math> | \end{cases}</math> | ||
| | |- | ||
| {{ | | {{enum|GL_EQUAL}} | ||
| <math>result = | | <math>result = | ||
\begin{cases} | \begin{cases} | ||
Line 38: | Line 38: | ||
0.0, & r \ne D_t | 0.0, & r \ne D_t | ||
\end{cases}</math> | \end{cases}</math> | ||
| | |- | ||
| {{ | | {{enum|GL_NOTEQUAL}} | ||
| <math>result = | | <math>result = | ||
\begin{cases} | \begin{cases} | ||
Line 45: | Line 45: | ||
0.0, & r = D_t | 0.0, & r = D_t | ||
\end{cases}</math> | \end{cases}</math> | ||
| | |- | ||
| {{ | | {{enum|GL_ALWAYS}} | ||
| <math>result = 1.0</math> | | <math>result = 1.0</math> | ||
| | |- | ||
| {{ | | {{enum|GL_NEVER}} | ||
| <math>result = 0.0</math> | | <math>result = 0.0</math> | ||
|} | |} | ||
<noinclude>[[Category:Template Tables]]</noinclude> |
Latest revision as of 07:17, 16 February 2013
Texture Comparison Function | Computed result |
---|---|
GL_LEQUAL | $ result={\begin{cases}1.0,&r\leq D_{t}\\0.0,&r>D_{t}\end{cases}} $ |
GL_GEQUAL | $ result={\begin{cases}1.0,&r\geq D_{t}\\0.0,&r<D_{t}\end{cases}} $ |
GL_LESS | $ result={\begin{cases}1.0,&r<D_{t}\\0.0,&r\geq D_{t}\end{cases}} $ |
GL_GREATER | $ result={\begin{cases}1.0,&r>D_{t}\\0.0,&r\leq D_{t}\end{cases}} $ |
GL_EQUAL | $ result={\begin{cases}1.0,&r=D_{t}\\0.0,&r\neq D_{t}\end{cases}} $ |
GL_NOTEQUAL | $ result={\begin{cases}1.0,&r\neq D_{t}\\0.0,&r=D_{t}\end{cases}} $ |
GL_ALWAYS | $ result=1.0 $ |
GL_NEVER | $ result=0.0 $ |