Mat4 * vec4 produces odd results

Issue #362 resolved
Oliver Dew
created an issue

Mat4 * vec4 produces odd results. Specifically, the w component of the vec4 appears to get mapped onto z, and z seems to get clobbered. E.g.:

m=matrix(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
    print(m*vec4(1,0,0,0)) -- 1   2  3   4
    print(m*vec4(0,1,0,0)) -- 5   6  7   8
    print(m*vec4(0,0,1,0)) -- 0   0  0   0  << ???
    print(m*vec4(0,0,0,1)) -- 9 10 11 12 << ???
    print(m*vec4(1,1,1,1))

Comments (1)

  1. Log in to comment