|
@@ -415,37 +415,45 @@ THREE.WebGLProgram = ( function () {
|
|
|
|
|
|
// cache attributes locations
|
|
// cache attributes locations
|
|
|
|
|
|
- identifiers = [
|
|
|
|
-
|
|
|
|
- 'position',
|
|
|
|
- 'normal',
|
|
|
|
- 'uv',
|
|
|
|
- 'uv2',
|
|
|
|
- 'tangent',
|
|
|
|
- 'color',
|
|
|
|
- 'skinIndex',
|
|
|
|
- 'skinWeight',
|
|
|
|
- 'lineDistance'
|
|
|
|
|
|
+ if ( material instanceof THREE.RawShaderMaterial ) {
|
|
|
|
|
|
- ];
|
|
|
|
|
|
+ identifiers = attributes;
|
|
|
|
|
|
- for ( var i = 0; i < parameters.maxMorphTargets; i ++ ) {
|
|
|
|
|
|
+ } else {
|
|
|
|
|
|
- identifiers.push( 'morphTarget' + i );
|
|
|
|
|
|
+ identifiers = [
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ 'position',
|
|
|
|
+ 'normal',
|
|
|
|
+ 'uv',
|
|
|
|
+ 'uv2',
|
|
|
|
+ 'tangent',
|
|
|
|
+ 'color',
|
|
|
|
+ 'skinIndex',
|
|
|
|
+ 'skinWeight',
|
|
|
|
+ 'lineDistance'
|
|
|
|
|
|
- for ( var i = 0; i < parameters.maxMorphNormals; i ++ ) {
|
|
|
|
|
|
+ ];
|
|
|
|
|
|
- identifiers.push( 'morphNormal' + i );
|
|
|
|
|
|
+ for ( var i = 0; i < parameters.maxMorphTargets; i ++ ) {
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ identifiers.push( 'morphTarget' + i );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
- // ShaderMaterial attributes
|
|
|
|
|
|
+ for ( var i = 0; i < parameters.maxMorphNormals; i ++ ) {
|
|
|
|
|
|
- if ( Array.isArray( attributes ) ) {
|
|
|
|
|
|
+ identifiers.push( 'morphNormal' + i );
|
|
|
|
|
|
- identifiers = identifiers.concat( attributes );
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // ShaderMaterial attributes
|
|
|
|
+
|
|
|
|
+ if ( Array.isArray( attributes ) ) {
|
|
|
|
+
|
|
|
|
+ identifiers = identifiers.concat( attributes );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|