コード例 #1
0
        public override double GetValue(double x, double y)
        {
            // Read:
            Color colour = SourceModule.GetColour(x, y);

            // Get:
            float channel = LabRgb.B(colour.r, colour.g, colour.b);

            return(channel);
        }
コード例 #2
0
        public override UnityEngine.Color GetColour(double x, double y)
        {
            // Read:
            Color colour = SourceModule.GetColour(x, y);

            // Get:
            float channel = LabRgb.B(colour.r, colour.g, colour.b);

            return(new Color(channel, channel, channel, 1f));
        }
コード例 #3
0
        public override double GetWrapped(double x, double y, int wrap)
        {
            // Read:
            Color colour = SourceModule.GetColour(x, y);

            // Get:
            float channel = LabRgb.Luminance(colour.r, colour.g, colour.b);

            return(channel);
        }
コード例 #4
0
        public override UnityEngine.Color GetColour(double x, double y)
        {
            // Read L:
            float l = (float)LightModule.GetValue(x, y);

            // Read A:
            float a = (float)AModule.GetValue(x, y);

            // Read B:
            float b = (float)BModule.GetValue(x, y);

            // Convert to RGB:
            LabRgb.ToRgb(ref l, ref a, ref b);

            // Now RGB.
            return(new Color(l, a, b, 1f));
        }