I often use a 2D Perlin noise texture to displace a grid in the vertex shader (e.g. terrain, ocean).  However, every time I google the method to calculate post-displacement normals there is a slight difference.  For example, the value to place in the Y-component varies depending on the source.  In this example, they place a '1' in the Y-component prior to normalization:https://software.intel.com/en-us/articles/real-time-parametric-shallow-wave-simulationWhereas in these codes, the value '2' is chosen:http://www.dian-xiang.com/blog/2What gives?  Is there a definitive source for calculating normals from a height map?  Might this be related to unprojecting mouse clicks?  It always bothered me that you could throw a '0.5' in the Z-component, as mrdoob mentioned here:https://stackoverflow.com/questions/11036106/three-js-projector-and-ray-objectsOr use a '1' in the Z-component as Anton does here:http://antongerdelan.net/opengl/raycasting.htmlIs there a connection between calculating normals from height maps and unprojecting mouse clicks?The second part of my question concerns choosing an epsilon to sample the height map.  Before I learned about height maps, I read about getting the normal from an implicit surface as in this link:http://www.iquilezles.org/www/articles/terrainmarching/terrainmarching.htmIt seems like the epsilon number is just made up though.  In my projects, I typically just fudge the value until it looks good.  Is there a definitive source, or at least a good rule of thumb?
Correct post-displacement normal calculation (Y-component and epsilon)
maths;real time;procedural generation