示例#1
0
        public LightMod GetLight(Vector2f xy)
        {
            if (!Enable)
            {
                return(LightMod.Dark);
            }
            LightMod re = Intensity;

            if (EnableMap && (IntensityMap != null))
            {
                re *= IntensityMap.Lightness(xy);
            }
            return(re);
        }
示例#2
0
 public static XYZSpectrum Mul(XYZSpectrum left, XYZSpectrum right)
 {
     return(new XYZSpectrum(left.X * right.X, left.Y * right.Y, left.Z * right.Z));
 }
示例#3
0
 public static RGBSpectrum FromRGB(XYZSpectrum xyz)
 {
     return(SpectrumTools.XYZToRGB(xyz));
 }
示例#4
0
 public static XYZSpectrum Mul(XYZSpectrum left, Float right)
 {
     return(new XYZSpectrum(left.X * right, left.Y * right, left.Z * right));
 }
示例#5
0
 public static XYZSpectrum Sub(XYZSpectrum left, XYZSpectrum right)
 {
     return(new XYZSpectrum(left.X - right.X, left.Y - right.Y, left.Z - right.Z));
 }
示例#6
0
 public static XYZSpectrum Add(XYZSpectrum left, XYZSpectrum right)
 {
     return(new XYZSpectrum(left.X + right.X, left.Y + right.Y, left.Z + right.Z));
 }
示例#7
0
 public static XYZSpectrum Lerp(XYZSpectrum l, XYZSpectrum r, Float lPower)
 {
     return(l * lPower + r * (1.0f - lPower));
 }
示例#8
0
 public static XYZSpectrum Div(XYZSpectrum left, Float right)
 {
     return(new XYZSpectrum(left.X / right, left.Y / right, left.Z / right));
 }