7.2. Forward declarations placement and /* PLUG-DECLARATIONS */

Some shading language directives are required to be placed before all normal declarations. For example, in case of the OpenGL shading language, the #version as well as some #extension directives must occur at the beginning of the shader code. To handle this, a magic comment /* PLUG-DECLARATIONS */ is available. If present, the forward or external declarations are inserted at the point of this comment (instead of at the beginning of shader source).

In most cases, you don't need to use #version or #extension directives, and you should let the engine add the automatic #version directive. See the CastleGLShaders docs: https://castle-engine.io/apidoc/html/CastleGLShaders.html.

Consequently, in most cases you should not need /* PLUG-DECLARATIONS */.