I edited the post heavily. You mustn't normalize the positions, because it will make all the positions unit length.
Hmm... Wait a minute. If you do this normalization and storing the length, and use the same method to render in the the game , so maybe it should be fine?
But I'm not at all sure about this here:
vec4 o_Vertex = ViewModel*vec4((o_HeightMap.rgb*2.0f-1.0f)*20.0f*(o_HeightMap.a),1.0f);
Even if it would work, your solution is much complicated than mine.
Um..... do you want to dynamically rotate the sprites in the game? MY connection is too slow to watch the video.
the sprites won't be rotated in game(other than billboarding toward the camera, and the camera is fixed, so in theory, i shouldn't have to worry about the billboard rotation),
if i normalize and store the length, it should work back correctly, since ur multiplying by the value that you divided each component by.
yes, i do agree that is most likly the problem line, for now i've hard coded the quad's size(which is 40/40, but is offset into the center, so it should be a radius of 20).
if you do ever get a chance, i highly recommend giving the video a watch, it's really awe-inspiring what the person has done, he has one other video that included weather/snow and it....it kindof brings a tear to the eye's how good the effect's look.
My last thought:
The normalizing method may be good, but you have to scale (map) the lengths that you store in the .a channel. Simply divide the .a values with the half of the in-editor bounding cube's width.
With my method, you could eliminate the need of the position map, and you could just use the .a component of the normal map.
Plus a lot of expensive normalization and stuff would be eliminated as well.
not certain if you saw my previous post, but i did think that was the potential issue(and it may be), however when i try to scale the value back(which for now is set to 16), it even breaks the sphere's correct mapping for some reason, even though in theory the result should be correct.
edit: i've been looking a bit closer at the ball that i thought was correct, but it seems to be slightly off, not exactly certain why, but i suspect it has to do with that single line.