The fragment shader program shown in this example is not exactly the same as the default VolumeViz shader, but it is functionally equivalent. Please notice that, by default, the shader source lines are supplied as string data compiled into the application program. Defining the macro USE_SHADER_FILE can force the program to load the shader out of a source file stored on the disk.
Also, please have a look to the well documented simpleShader.glsl code to get more information.
SoFragmentShader, SoVolumeShader