IMP
IMP copied to clipboard
Unneeded code ?
Hi, I'm currently trying to implement this technique in my engine, and while trying to understand how it works, I've some trouble understanding this code:
//subtract from camera pos
vertexOffset = normalize(objectSpaceCameraPos-vertexOffset);
//then add the original projected world
vertexOffset += projected;
//remove position of vertex
vertexOffset -= vertex.xyz;
//add pivot
vertexOffset += imposterPivotOffset;
If I comment the previous lines and later in the file, replace:
imp.vertex.xyz += vertexOffset;
by
imp.vertex.xyz = vertexOffset;
It looks like it gives exactly the same result.
Am I missing something ?