What is probably happening is that the move constructor is moving the temp local variable to the temporary returned by the function, and then move assignment is moving from that unnamed temporary to a1.
I think you are right. I disabled the move operations and then got
for that line. For some reason, I didn't think the compiler had to do a copy from the local temp to the unnamed temp in main(). I thought it would just copy assign the local temp to a1 directly.
Yeah I was looking at the paper again, and it is just phong with a modified normal (although this paper is a bit old so might not be the modern way to do anisotopic lighting). Instead of doing their precomputed lookup texture, I'll just write the modified normal during the deferred pass, then the lighting will be the same.
However, soon I will want to upgrade my lighting model from phong to something more modern. What is a popular modern anisotropic model I can look into?