Tuesday, March 18, 2008

Cube Mapping

The GLSL mat3 constructor that is supposed to take a mat4 and slice out the upper 3x3 doesn't work on my MacBook Pro. Apparently I'm not the only one. http://emergencyexit.untergrund.net/2007/12/glsl/

As described in the above url, you can use the following instead:

mat3(matrix[0].xyz, matrix[1].xyz, matrix[2].xyz)

No comments: