Me again.. still messing around with colour correction.
Is it possible to bind a Colour Curve to a non-PBM Material? When I attempt the following I get errors:
let mat = new BABYLON.ShaderMaterial("mat", scene, "./assets/shaders/blub",
{
attributes: ["position", "uv"],
uniforms: ["worldViewProjection", "globalScale", "globalOffset", "vCameraColorCurvePositive", "vCameraColorCurveNeutral", "vCameraColorCurveNegative"],
needAlphaBlending: true
});
var curve = new BABYLON.ColorCurves();
curve.GlobalHue = 200;
curve.GlobalDensity = 100;
BABYLON.ColorCurves.Bind(curve, mat._effect);
// throws Uncaught TypeError: Cannot read property 'setFloat4' of undefined