Using custom shader in Rendered display mode

In Eyeshot 5 we added support for shaders for graphics cards with OpenGL greater than 3.3 to create a variety of effects in the Rendered display mode (shadows, Phong lighting, fade out of planar reflections...).

The user can create a custom shader and use it to affect the way entities are drawn.

Beware that this will override the shaders used by Eyeshot to draw that entity so you will lose all Eyeshot's effects.

Here's how to do it.

1. Define a class derived from Eyeshot GLShader class and a class to store the shader parameters:

3. After the Form has been loaded (for instance in the Form.OnLoad() method) create the shader, compile it, assing the parameters and assign the shader to the custom entity. Finally add the entity to the ViewportLayout: