Exemplo n.º 1
0
 public override Color Eval(Normal normal, Vec inDir, Vec outDir, Vec2D uv)
 {
     return this.pigment.getColor(uv) * (this.reflectance / Constant.PI);
 }
Exemplo n.º 2
0
 public abstract Color Eval(Normal normal, Vec inDir, Vec outDir, Vec2D uv);
Exemplo n.º 3
0
 public abstract Ray scatterRay(PCG pcg, Vec incomingDir, Point interactionPoint, Normal normal, int depth);
Exemplo n.º 4
0
 /// <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();