OpenGL has a programming language implemented known as GLSL (OpenGL Shading Language). It is a C-like language that was introduced to create own definitions of shaders and RealFlow provides an interface to GLSL. This way you can specify custom tailored shaders by either importing source code or using a so-called framebuffer as texture. The framebuffer method allows you to build complex shaders with a variety of different attributes. You can apply code for vertex, fragment and geometry shaders.
For more information about shader programming please search the Internet or visit OpenGL’s official site. There are also many free examples available which can be used with RealFlow. Next Limit does not provide support for GLSL.
Shader Type
RealFlow offers a total of 4 different methods with additional options: “None”, “Transparent”, “Displacement” and “Custom”. It is also important to know that a mesh’s colour selection from the "Node" panel can influence the final appearance of some shaders. Each entry unlocks a set of completely different parameters. The default mode is "None" and does not provide any options or functions.
Vertex Shader
Here you can specify the path to an external vertex shader program, typically a .vert file.
Fragment Shader
This feature has the same function as “Vertex Shader”, but requires a .frag file.
Reload Shader
With this button you can reload and update the shader file(s).
When set to “Yes” it is possible to use the following parameters for creating your own shader definition. Some of the values are represented by numbers; others use colours. Colour parameters can only use positive settings and colour integers between 0 and 255 will be translated into values between 0 and 1. You can also define 5 textures which will be passed to the shader. The available settings are:
FloatVar0-9
This field expects a floating point number.
Vec3Var0-9
Here three values are needed, because in RealFlow a vector always consists of three elements.
Vec4Var0-9
Similar to “Vec3Var0-9” three values are necessary, but they are represented as RGB colours. A RGB colour also uses a triplet of values and can be seen as a vector.
Texture0-4
Just load up to 5 custom textures to be passed to the OpenGL shader engine.