how do i convert a heightmap to a normal map? I found two different solutions but i need a correct explanation
the above two procedures don't seem to be the same to me. the first one samples the heights in the X and Y directions whereas the second one defines the X and Y components as unit. which one is the correct?