public LightMod GetLight(Vector2f xy) { if (!Enable) { return(LightMod.Dark); } LightMod re = Intensity; if (EnableMap && (IntensityMap != null)) { re *= IntensityMap.Lightness(xy); } return(re); }
public static XYZSpectrum Mul(XYZSpectrum left, XYZSpectrum right) { return(new XYZSpectrum(left.X * right.X, left.Y * right.Y, left.Z * right.Z)); }
public static RGBSpectrum FromRGB(XYZSpectrum xyz) { return(SpectrumTools.XYZToRGB(xyz)); }
public static XYZSpectrum Mul(XYZSpectrum left, Float right) { return(new XYZSpectrum(left.X * right, left.Y * right, left.Z * right)); }
public static XYZSpectrum Sub(XYZSpectrum left, XYZSpectrum right) { return(new XYZSpectrum(left.X - right.X, left.Y - right.Y, left.Z - right.Z)); }
public static XYZSpectrum Add(XYZSpectrum left, XYZSpectrum right) { return(new XYZSpectrum(left.X + right.X, left.Y + right.Y, left.Z + right.Z)); }
public static XYZSpectrum Lerp(XYZSpectrum l, XYZSpectrum r, Float lPower) { return(l * lPower + r * (1.0f - lPower)); }
public static XYZSpectrum Div(XYZSpectrum left, Float right) { return(new XYZSpectrum(left.X / right, left.Y / right, left.Z / right)); }