提交 0610f573 编写于 作者: A alteredq

Fixed vertex shader to work in Mac.

上级 3ee99dc4
此差异已折叠。
此差异已折叠。
......@@ -1042,7 +1042,9 @@ THREE.WebGLRenderer = function ( scene ) {
"vec4 mPosition = objMatrix * vec4( position, 1.0 );",
"vViewPosition = cameraPosition - mPosition.xyz;",
"vec3 nWorld = mat3(objMatrix) * normal;",
// this doesn't work on Mac
//"vec3 nWorld = mat3(objMatrix) * normal;",
"vec3 nWorld = mat3( objMatrix[0].xyz, objMatrix[1].xyz, objMatrix[2].xyz ) * normal;",
// eye space
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册