title: Trying to implement Gouraud shading, not exactly what I am looking for
body: <p><img src="https://i.stack.imgur.com/y0Yml.jpg" alt="enter image description here" /></p>
  <p>these are the results</p>
  <p>way far from what it is supposed to be.</p>
  <p>I do calculate the color at each vertex first and sent it to linear interpolation to get the color</p>
  <pre><code>
  scene.light.Set_Normal(glm::normalize(normalprojection*glm::vec4(scene.GetModel(j).GetNormal(scene.GetModel(j).GetFace(i).GetVertexIndex(0) - 1),1.0f)));
  
  colorp1=scene.light.Compute_Color(scene.GetModel(j), i, scene.GetActiveCamera().eye, temp1);
  
  scene.light.Set_Normal(glm::normalize(normalprojection*glm::vec4(scene.GetModel(j).GetNormal(scene.GetModel(j).GetFace(i).GetVertexIndex(1) - 1),1.0f)));
  
  colorp2=scene.light.Compute_Color(scene.GetModel(j), i, scene.GetActiveCamera().eye, temp2);
              
              scene.light.Set_Normal(glm::normalize(normalprojection*glm::vec4(scene.GetModel(j).GetNormal(scene.GetModel(j).GetFace(i).GetVertexIndex(2) - 1),1.0f)));
  
  colorp3=scene.light.Compute_Color(scene.GetModel(j), i, scene.GetActiveCamera().eye, temp3);
  </code></pre>
  <p>temp1, temp2, temp3, are the vertices after applying all transformations</p>
  <pre><code>glm::vec3 Renderer::Gouraud_shading(glm::vec3 p1,glm::vec3 p2,glm::vec3 p3,glm::vec3 colorp1,glm::vec3 colorp2,glm::vec3 colorp3,glm::vec3 point)
  {
      float A_1 = area(p2.x, p2.y, p3.x, p3.y, point.x, point.y);
      float A_2 = area(p1.x, p1.y, p3.x, p3.y, point.x, point.y);
      float A_3 = area(p2.x, p2.y, p1.x, p1.y, point.x, point.y);
      float A = A_1 + A_2 + A_3;
      glm::vec3 temp=glm::vec3(A_1/A,A_2/A,A_3/A);
      return (colorp1*temp.x,colorp2*temp.y,colorp3*temp.z);
      
  }
  </code></pre>
  <p>anyone?</p>