提交 1d904463 编写于 作者: M Mr.doob

Updated builds.

上级 d220ba31
......@@ -24315,7 +24315,7 @@ THREE.WebGLProgram = ( function () {
var name = info.name;
var location = gl.getUniformLocation( program, name );
//console.log("THREE.WebGLProgram: ACTIVE UNIFORM:", name);
// console.log("THREE.WebGLProgram: ACTIVE UNIFORM:", name);
var suffixPos = name.lastIndexOf( '[0]' );
if ( suffixPos !== - 1 && suffixPos === name.length - 3 ) {
......@@ -24343,7 +24343,7 @@ THREE.WebGLProgram = ( function () {
var info = gl.getActiveAttrib( program, i );
var name = info.name;
//console.log("THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:", name);
// console.log("THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:", name, i );
attributes[ name ] = gl.getAttribLocation( program, name );
......@@ -24368,18 +24368,6 @@ THREE.WebGLProgram = ( function () {
var vertexShader = material.__webglShader.vertexShader;
var fragmentShader = material.__webglShader.fragmentShader;
var index0AttributeName = material.index0AttributeName;
/*
if ( index0AttributeName === undefined && parameters.morphTargets === true ) {
// programs with morphTargets displace position out of attribute 0
index0AttributeName = 'position';
}
*/
var shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC';
if ( parameters.shadowMapType === THREE.PCFShadowMap ) {
......@@ -24647,13 +24635,16 @@ THREE.WebGLProgram = ( function () {
gl.attachShader( program, glVertexShader );
gl.attachShader( program, glFragmentShader );
if ( index0AttributeName !== undefined ) {
// Force a particular attribute to index 0.
// Force a particular attribute to index 0.
// because potentially expensive emulation is done by browser if attribute 0 is disabled.
// And, color, for example is often automatically bound to index 0 so disabling it
if ( material.index0AttributeName !== undefined ) {
gl.bindAttribLocation( program, 0, index0AttributeName );
gl.bindAttribLocation( program, 0, material.index0AttributeName );
} else if ( parameters.morphTargets === true ) {
// programs with morphTargets displace position out of attribute 0
gl.bindAttribLocation( program, 0, 'position' );
}
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册