public override Color Eval(Normal normal, Vec inDir, Vec outDir, Vec2D uv) { return this.pigment.getColor(uv) * (this.reflectance / Constant.PI); }
public abstract Color Eval(Normal normal, Vec inDir, Vec outDir, Vec2D uv);
public abstract Ray scatterRay(PCG pcg, Vec incomingDir, Point interactionPoint, Normal normal, int depth);
/// <summary> /// Dot product between two normalized <see cref="Vec"/>s. /// </summary> /// <param name="v1"></param> /// <param name="v2"></param> /// <returns></returns> public static float NormalizedDot(Vec v1, Vec v2) => v1.Normalize() * v2.Normalize();