PDA

View Full Version : GLSL Cross Product documentation bug on website



cybernoid
07-10-2016, 08:47 AM
Looking at https://www.opengl.org/sdk/docs/man/html/cross.xhtml I believe the cross product is specified incorrectly in the last two elements in the last row:

x[1] . y[2] - y[1] . x[2]
x[2] . y[0] - y[2] . x[0]
x[0] . y[1] - y[1] . x[0] => term y[1] . x[0] is wrong!

It differs from the GLSL language spec here: https://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf

I believe the correct version is the one from language spec:

x[1] . y[2] - y[1] . x[2]
x[2] . y[0] - y[2] . x[0]
x[0] . y[1] - y[0] . x[1]


Not sure how to get that fixed :)