提交 d28ffdb5 编写于 作者: C Clark Lavery

Adding support for normalScale as part of the normalTexture

上级 90370113
......@@ -1613,6 +1613,11 @@ THREE.GLTFLoader = ( function () {
pending.push( parser.assignTexture( materialParams, 'normalMap', material.normalTexture.index ) );
if ( material.normalTexture.scale ) {
materialParams.normalScale = new THREE.Vector2( material.normalTexture.scale, material.normalTexture.scale );
}
}
if ( material.occlusionTexture !== undefined ) {
......@@ -1667,7 +1672,7 @@ THREE.GLTFLoader = ( function () {
// Normal map textures use OpenGL conventions:
// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#materialnormaltexture
_material.normalScale.x = -1;
_material.normalScale.x = -_material.normalScale.x;
if ( material.extras ) _material.userData = material.extras;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册