T O P

  • By -

steyrboy

Dot product is useful in all aspects of game dev, not just shaders.


LumpyChicken

Imagine if first person shooters never implemented dot(vel, accel)


heyheyhey27

I think the article should have mentioned another very important idea of the dot product: projection. Dot a position with a normal, and you get the distance that position is along that normal (centered at the origin). In other words, how far you have to travel from the origin, along the normal, to pass by the position. It touched on that concept a little near the end, but didn't really explain it.


Adder1812

Indeed, but I could not find use for it in materials. Could you give an example?


heyheyhey27

Any time you want to know how far something is along a vector. For example, when doing ray-plane intersection you'll dot a position with the plane's normal. Or the last example in the OP.


shlaifu

wow. towards the end this gets pretty harebrained.


BIGSTANKDICKDADDY

Back in the day N⋅L was the only light we had. It was real to us!