コード例 #1
0
        public override double GetValue(double t)
        {
            // Read amplitude:
            double amp = Contrast.GetValue(t);

            // Origin:
            double origin = Origin.GetValue(t);

            // Sample at that point:
            return(((SourceModule1.GetValue(t) - origin) * amp) + origin);
        }
コード例 #2
0
        public override double GetValue(double x, double y)
        {
            if (SourceModule == null)
            {
                return(0);
            }

            double origin    = Origin.GetValue(x, y);
            double baseValue = SourceModule.GetValue(x, y);
            double contrast  = 1.0 + Contrast.GetValue(x, y);

            return(((baseValue - origin) * contrast) + origin);
        }
コード例 #3
0
        public override UnityEngine.Color GetColour(double x, double y)
        {
            UnityEngine.Color col1     = SourceModule.GetColour(x, y);
            float             contrast = 1f + (float)Contrast.GetValue(x, y);
            float             origin   = (float)Origin.GetValue(x, y);

            // Boost:
            col1.r = ((col1.r - origin) * contrast) + origin;
            col1.g = ((col1.g - origin) * contrast) + origin;
            col1.b = ((col1.b - origin) * contrast) + origin;

            return(col1);
        }