HM - Shader: Custom

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. 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.


This is a shortened view of the "Custom" shader parameter set.

 

Shader Type

Aside from “Custom” there are three more modes:

  • “None” disables shading.
  • “Transparent” is explained separately → here.
  • “Displacement” is explained separately → here.
Vertex Shader

Here you can specify the path to an external vertex shader, typically a .vert file.

Fragment Shader

Here you can specify the path to an external vertex shader, typically a .frag file.

Reload Shader

With this button you can reload and update the shader file(s).

FrameBuffer as texture

When enabled 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 up to five textures which will be passed to the shader.
FloatVar0-9

Each field expects a floating point number.

Vec3Var0-9

Here three values are needed, because in RealFlow a vector always consists of three elements. Click on “+” for parameter sliders.

Vec4Var0-9

Each field expects a colour. Click on “+” for RGBA sliders.

Texture0-4

Load up to five custom textures to be passed to the OpenGL shader engine.