Basic use

Here you can learn the basic use of the shader editor.

After starting the editor, you should see two windows. On the left side, a window with many controls and a white quad on a black background. On the right side, you should see a text editor window with some text in it.

Let's first look at the left window. It contains controls to modify the state of OpenGL and the active shader. You can see several tabs, the active tab is titled 'Scene'. The other tabs are of no interest at the moment.

The 'Scene' tab is the most important tab of the editor. Here you can manipulate the state related to rendered the scene. It includes the test model, projection matrix, etc.

The first thing to learn is how to navigate the scene. This is useful, if you want to take a closer look at your shader. If you click with the left mouse button into the rendering window and move the mouse (while still holding the left mouse button pressed), you can rotate the test model around it's origin. You can do the same with the right and middle mouse buttons. The right mouse button let you move the test model towards and away from the camera position. Middle button moves the test model parallel to the projection plane. If you 'lost' you test model, you can use the 'Reset Camera Position and Rotation' button on the bottom of the scene widget. As it is labeled, it resets the model to it's default position and rotation. An alternate way to reset the camera is to hit the ESC-key when the rendering window has the input focus.

Always looking at a quad is boring. If you want to see a more intresting test model, you can use the 'Test Model' combo box to select another one. If you selected the 'Mesh' model, you won't see anything. This is because you first have to load a model from a file. Loading models can be done by clicking the button in the 'Mesh File' group box. It brings up a dialog, whre you can select a model in the .OBJ format. After loading, the model is scaled to fit into the unit cube. Note that the shader editor only supports a subset of the .OBJ file format, but it should be enough for our purpose...

In the 'Projecton Matrix / Viewport' group box, you can modify OpenGL's projection matrix. You can set a custom field of view, if you do not like the default. The value 'Auto' selects a vertical FOV of 50 degree and a horizontal FOV relative to the window's aspect ratio. This makes sure that the test model is not deformed, meaning that a shpere is always drawn as a sphere and not deformed to an ellipsoid. Finally, you can select the color that is used in the glClearColor command. In short, you can select the 'background color'

The 'Geometry Processing' groub box contains several check boxes with rendering state flags.

The 'Geometry Shader' group box deals with special geometry shader state and is not explained here. See the geometry shader tutorial for an explanation.

Now you are ready to write The first shader.


Generated on Sun Mar 2 17:12:31 2008 for Shader Maker by  doxygen 1.5.4