title: transform world space normals to screen space normals
body: <p>What is the proper way to transform surface normals defined in world space to normals in screen space? I don't think they can simply be multiplied by the projection matrix, because perspective division transforms things into clip space and as far as I understand, in this space planes that are coplanar to the image plane remain coplanar.</p>
  
  <p>But the transformation I'm looking for should result in transformed normals such that the blue world normals depicted in graphic A should result in differing screenspace normals (because, even though their planes are coplanar to the image plane, they do not face the camera) - on the other hand the depicted normals in graphic B should after the transformation be (more or less) equal, since their surfaces face the camera.</p>
  
  <p><img src="https://i.stack.imgur.com/dfXZk.gif" alt="enter image description here"></p>
  
  <p>What transformation am I looking for? how to calculate it?</p>
  
  <p>I need this for some screen-space effects.</p>