예제 #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));
 }