Below the material properties, you see the “Connection Editor” button. Click it and you will activate the editor of user-defined shader parameters.
The dialog window of this editor is divided in two: the left panel lists the shader's parameters and the right panel lists the values set for these parameters. The upper line under the Properties scroll in the Connection Editor – CgFX Shader – shows the name of the loaded file with the shader. A click at the right part of this line gives you access to additional interface elements – Edit and File (otherwise, they are invisible). These two options allow editing the program text of the loaded shader or load a file with another shader.
The Technique line is next. This is the rendering technique used by the shader (for example, with or without vertex and pixel pipelines). This is a drop-down list: if the graphics card allows, there will be several options available. As we have seen above, different rendering methods should be coded in one shader to ensure compatibility with older graphics cards. When loaded, the shader automatically selects the most optimal technique for the installed card. The list and values of the parameters listed below is specific for each shader.
That's about all. Summing up, we will have the following work algorithm for processing shaders in 3d studio max: 1) load a 3D object, 2) using the standard max tools assign texture coordinates to the surface, 3) activate CgFX and 4) load a necessary hardware shader from a file. Then you are free to be creative: change the shader parameters or edit its code directly and view the result in the viewport. The values you assign to the parameters are local, that is, they are only working in the current scene. The changes you make to the code are global – they change all scenes that use this shader. And don't forget about loading your own textures into the corresponding material properties slots!
On the whole, the plug-in is easy to use. Once again, I'd like to stress that the hardware shader is displayed in the project window. Its result will generally be different from the results you achieve with the rendering module of 3d studio max: the inbuilt 3d studio max rendering capabilities are downright poor in contrast to CgFX.
On the left – the picture is constructed by DiffuseBump.fx shader from the library coming with the plug-in (a screenshot of max’s viewport on a GeForce 2 Pro graphics card).
On the right – the same picture as rendered by max’s scanline-renderer. Today, there are much more perfect graphics cards in the market, which produce much better images. However, the picture we took on GeForce2, which has no pixel or simplest vertex shader support altogether, looks very nice.