Graphics Reference
In-Depth Information
Figure 4.1. The cycle of experimentation without glman (left) and with glman (right).
details are described later in this chapter. This is an ASCII-encoded input file
inspired by the Photorealistic RenderMan RIB file. You need to have both a
vertex shader and a fragment shader to use glman ; you can also have a tessel-
lation shader or a geometry shader if you want, and if your system supports it.
You start by writing a GLIB file that describes your geometry and speci-
fies your vertex, tessellation, geometry, and fragment shaders. The GLIB file
can define uniform variables, including variables that can be changed using
sliders or color pickers. You can edit GLIB and shader files from within glman ,
so you can start adding effects to the shaders, or geometry to the GLIB file, to
get incremental results. The glman system will return error messages if you
have compile errors in your shaders, which is very helpful as you begin to
learn to develop them. This experimental approach and incremental develop-
ment of shaders gives you good feedback on what works and lets you create
some very interesting images along the way.
While glman will let you make some very interesting images that illus-
trate how your shaders work, you should realize that it is not a production
tool for creating general graphics applications. There were conscious design
decisions to support only a limited geometry and interaction set, for example.
What it does is give you a tool to develop shaders easily and fairly quickly and
to experiment with shader parameters, and it does that very well.
When you are satisfied that the shaders you have developed do the things
you want, you can be confident that they will be useable for your other work.
Later chapters discuss how to use shaders for applications, so the shaders you
develop here will be useful there.
You can get glman from this topic's website at htp://www.cgeducation
.org/glman. It runs on Windows, even if you do not have a compiler and pro-
gramming environment on the system. Linux and Macintosh versions are
Search WWH ::




Custom Search