export default /* glsl */ ` #ifdef UV_TILE mat3 tileTransform = makeTileTransform(floor(uvTile)); #ifdef TILE_BLEND mat3 nextTileTransform = makeTileTransform(ceil(uvTile)); vUvBlend = fract(uvTile); #endif #else mat3 tileTransform = makeTileTransform(0.0); #endif #if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = (tileTransform *vec3( uv, 1 )).xy; #if defined( TILE_BLEND ) && defined( UV_TILE ) vUvNext = (nextTileTransform *vec3( uv, 1 )).xy; #endif #endif #ifdef USE_MAP vMapUv = ( tileTransform * (mapTransform * vec3( MAP_UV, 1 ) )).xy; #if defined( TILE_BLEND ) && defined( UV_TILE ) vMapUvNext = (nextTileTransform * (mapTransform * vec3( MAP_UV, 1 ))).xy; #endif #endif #ifdef USE_ALPHAMAP vAlphaMapUv = ( tileTransform * (alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) )).xy; #endif #ifdef USE_LIGHTMAP vLightMapUv = ( tileTransform * (lightMapTransform * vec3( LIGHTMAP_UV, 1 ) )).xy; #endif #ifdef USE_AOMAP vAoMapUv = ( tileTransform * (aoMapTransform * vec3( AOMAP_UV, 1 ) )).xy; #endif #ifdef USE_BUMPMAP vBumpMapUv = ( tileTransform * (bumpMapTransform * vec3( BUMPMAP_UV, 1 ) )).xy; #endif #ifdef USE_NORMALMAP vNormalMapUv = ( tileTransform * (normalMapTransform * vec3( NORMALMAP_UV, 1 ) )).xy; #endif #ifdef USE_DISPLACEMENTMAP vDisplacementMapUv = ( tileTransform * (displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) )).xy; #endif #ifdef USE_EMISSIVEMAP vEmissiveMapUv = ( tileTransform * (emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) )).xy; #endif #ifdef USE_METALNESSMAP vMetalnessMapUv = ( tileTransform * (metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) )).xy; #endif #ifdef USE_ROUGHNESSMAP vRoughnessMapUv = ( tileTransform * (roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) )).xy; #endif #ifdef USE_ANISOTROPYMAP vAnisotropyMapUv = ( tileTransform * (anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) )).xy; #endif #ifdef USE_CLEARCOATMAP vClearcoatMapUv = ( tileTransform * (clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) )).xy; #endif #ifdef USE_CLEARCOAT_NORMALMAP vClearcoatNormalMapUv = ( tileTransform * (clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) )).xy; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP vClearcoatRoughnessMapUv = ( tileTransform * (clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) )).xy; #endif #ifdef USE_IRIDESCENCEMAP vIridescenceMapUv = ( tileTransform * (iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) )).xy; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP vIridescenceThicknessMapUv = ( tileTransform * (iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) )).xy; #endif #ifdef USE_SHEEN_COLORMAP vSheenColorMapUv = ( tileTransform * (sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) )).xy; #endif #ifdef USE_SHEEN_ROUGHNESSMAP vSheenRoughnessMapUv = ( tileTransform * (sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) )).xy; #endif #ifdef USE_SPECULARMAP vSpecularMapUv = ( tileTransform * (specularMapTransform * vec3( SPECULARMAP_UV, 1 ) )).xy; #endif #ifdef USE_SPECULAR_COLORMAP vSpecularColorMapUv = ( tileTransform * (specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) )).xy; #endif #ifdef USE_SPECULAR_INTENSITYMAP vSpecularIntensityMapUv = ( tileTransform * (specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) )).xy; #endif #ifdef USE_TRANSMISSIONMAP vTransmissionMapUv = ( tileTransform * transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) )).xy; #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( tileTransform * thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) )).xy; #endif `