Master's Thesis - Studierstube Augmented Reality Project - Graz ...
Master's Thesis - Studierstube Augmented Reality Project - Graz ...
Master's Thesis - Studierstube Augmented Reality Project - Graz ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
4.4 Visualization Framework<br />
The order is arbitrary and recurrences are allowed. (for example vector.xxwy).<br />
{s,t,p,q}-letters are allowed for indexing as well.<br />
• All basic matrix and vector operations are available for the according types.<br />
• Many standard geometric, trigonometric and exponential functions are available<br />
as described in [Fernandes2007]<br />
built-in variables, attributes and constants<br />
The most important of them are listed below. A complete list of them is given in<br />
[Tatarchuk2004]<br />
• vertex shader writable variables<br />
– vec4 gl_Position: equals to the homogeneous coordinate position of the<br />
vertex and must be written.<br />
• vertex shader readable attributes:<br />
– vec4 gl_Color: color value of the vertex;<br />
– vec4 gl_Normal: normal vector of the vertex;<br />
– vec4 gl_Vertex: coordinate of the vertex;<br />
– vec4 gl_MultiTexCoord0..7: texture coordinates on texture units 0...7.<br />
• fragment shader writable variables:<br />
– vec4 gl_FragColor: must be written and defines the color of the output<br />
fragment;<br />
– vec4 gl_FragData[0..15]: refers to the same as vec4 gl_FragColor but<br />
for multiple render targets.<br />
• fragment shader readable attributes:<br />
– vec4 gl_FragCoord: reads the position of the fragment relative to the window<br />
position (x,y,z,1/w);<br />
– bool gl_FrontFacing: reads if the fragment belongs to a front facing primitive.<br />
76