public Vector4 Vertex(int iface, int nthvert) { Vector3 gl_Vertex = Model.GetVertex(iface, nthvert); varying_uv.Set_Col(Model.GetUV(iface, nthvert), nthvert); var m = VPM.MultiplyByVector3_V4(gl_Vertex); return(m); }
public Vector4 Vertex(int iface, int nthvert) { Vector3 gl_Vertex = Model.GetVertex(iface, nthvert); varying_uv.Set_Col(Model.GetUV(iface, nthvert), nthvert); var m = VPM.MultiplyByVector3_V4(gl_Vertex); switch (nthvert) { case 0: varying_intensity.X = Math.Max(0, Vector3.Dot(Model.GetNormal(iface, nthvert), light_dir)); break; case 1: varying_intensity.Y = Math.Max(0, Vector3.Dot(Model.GetNormal(iface, nthvert), light_dir)); break; case 2: varying_intensity.Z = Math.Max(0, Vector3.Dot(Model.GetNormal(iface, nthvert), light_dir)); break; } return(m); }