|
@@ -38,6 +38,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
function getChannel( value ) {
|
|
|
|
|
|
if ( value === 1 ) return 'uv2';
|
|
|
+ if ( value === 2 ) return 'uv3';
|
|
|
+ if ( value === 3 ) return 'uv4';
|
|
|
|
|
|
return 'uv';
|
|
|
|
|
@@ -152,6 +154,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
const HAS_EXTENSIONS = !! material.extensions;
|
|
|
|
|
|
const HAS_ATTRIBUTE_UV2 = !! geometry.attributes.uv2;
|
|
|
+ const HAS_ATTRIBUTE_UV3 = !! geometry.attributes.uv3;
|
|
|
+ const HAS_ATTRIBUTE_UV4 = !! geometry.attributes.uv4;
|
|
|
|
|
|
const parameters = {
|
|
|
|
|
@@ -264,6 +268,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
vertexColors: material.vertexColors,
|
|
|
vertexAlphas: material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4,
|
|
|
vertexUvs2: HAS_ATTRIBUTE_UV2,
|
|
|
+ vertexUvs3: HAS_ATTRIBUTE_UV3,
|
|
|
+ vertexUvs4: HAS_ATTRIBUTE_UV4,
|
|
|
|
|
|
pointsUvs: object.isPoints === true && !! geometry.attributes.uv && ( HAS_MAP || HAS_ALPHAMAP ),
|
|
|
|
|
@@ -457,8 +463,12 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
_programLayers.enable( 12 );
|
|
|
if ( parameters.vertexUvs2 )
|
|
|
_programLayers.enable( 13 );
|
|
|
- if ( parameters.vertexTangents )
|
|
|
+ if ( parameters.vertexUvs3 )
|
|
|
_programLayers.enable( 14 );
|
|
|
+ if ( parameters.vertexUvs4 )
|
|
|
+ _programLayers.enable( 15 );
|
|
|
+ if ( parameters.vertexTangents )
|
|
|
+ _programLayers.enable( 16 );
|
|
|
|
|
|
array.push( _programLayers.mask );
|
|
|
_programLayers.disableAll();
|