Out of curiosity - the question is still valid. Is there any way to configure compiler to have control over what it accepts and what it rejects?
No, there is no way to configure the compiler. The differences between Synthclipse and Fragmentarium which you observed come from different GLSL versions used in shaders in those apps. Fragmentarium uses probably GLSL 1.50 (OpenGL 3.2) and Synthclipse uses GLSL >= 3.3 (OpenGL >= 3.3). I've noticed that drivers often use different compiler implementations for different versions of GLSL. Some of them are more restricted than others, like in your case (warning vs error, with the same case).
In Synthclipse you can select desired GLSL version in "Window -> Preferences -> Synthclipse -> Declared GLSL version", but below 3.30 version you would need to manually change some keywords ("in", "out", "layout(location = 0)") in shaders like 3D.frag, 3D.verts to corresponding words from older GLSL version to be able to run shaders. Unfortunately Fragmentarium importer always converts shaders to GLSL 3.30.
Another question.
I've gone through manuals but couldn't find it.
In the workflows I've developed I'm importing external camera transformation matrices to set the camera in the shader to match external footage for compositing.
Essentially it's a 3x3 camera transformation position with up/right/forward vectors plus a FOV.
In Fragmentarium I applied it each frame via QScript - so in my QScript editor I had my say 1000 frames-long array of transformations and for each of frames I'd set a set a uniforms based on that data.
What would be a way to do it in Synthclipse?
You can achieve the same thing with JSX scripts. Import example from the main menu "Synthclipse -> JSX examples -> II. Synth API -> 3. Loading Fragx files'.
Add the following uniform to file "fragx/Flaring.stoy" after importing:
uniform mat3 MyCameraMatrix;
and use it somehow in that shader.
Next replace content of "loading-fragx-files.jsx" file with:
"use strict";
var fragxRenderer = null;
var renderable = {};
renderable.init = function() {
// see http://synthclipse.sourceforge.net/scripting/api/index.html?org/synthclipse/scripting/core/JSFragxRenderer.html
fragxRenderer = Synthclipse.loadFragx("fragx/Flaring.stoy");
// We can load saved preset:
fragxRenderer.loadPreset("Type 5");
// If we want to have controls in the Uniform Controls View
// we must create them explicitly:
Synthclipse.createControls(fragxRenderer);
};
renderable.display = function() {
// animation time in seconds
// see http://synthclipse.sourceforge.net/scripting/api/index.html?org/synthclipse/scripting/core/JSSynthclipse.html
var animationTime = Synthclipse.getTime();
// see http://synthclipse.sourceforge.net/scripting/api/index.html?org/synthclipse/scripting/core/JSNative.html
var cameraMatrix = Native.newMatrix3();
// first row:
cameraMatrix.m00 = 1.0 + animationTime;
cameraMatrix.m01 = 0.0;
cameraMatrix.m02 = 0.0;
// second row:
cameraMatrix.m10 = 0.0;
cameraMatrix.m11 = 1.0;
cameraMatrix.m12 = 0.0;
// Third row:
cameraMatrix.m20 = 0.0;
cameraMatrix.m21 = 0.0;
cameraMatrix.m22 = 1.0;
// IMPORTANT: Be sure the name is correct!
// Unfortunately in current version of Synthclipse
// you won't get a warning if the name is incorrect.
fragxRenderer.setUniform("MyCameraMatrix", cameraMatrix);
fragxRenderer.render();
};
renderable.resize = function(width, height) {
fragxRenderer.resize(width, height);
};
Synthclipse.setRenderable(renderable);
You will get an idea how to set uniforms in scripts.
If you want to keep your data in a separate file, you can read text files in JSX scripts using the following function:
// see http://synthclipse.sourceforge.net/scripting/api/org/synthclipse/scripting/core/JSSynthclipse.html#readFile-java.lang.String-
var textFileContent = Synthclipse.readFile("MyTextFile.txt");
As of parsing your file... JSX scripts are JavaScript scripts so please search the Web how to split Strings and casts them to Numbers in JavaScript (I'm not an JS expert).