summaryrefslogtreecommitdiff
path: root/tools/editor/io_plugins
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-10-14 01:01:25 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-10-14 01:01:25 -0300
commita84ba9c853f972f8e666b17f3e0f875b7282e6c1 (patch)
tree70a5d44acbecc93011333d13dd51b1786d42eae3 /tools/editor/io_plugins
parent13a848e332092b40956739a08fa0dac3357db950 (diff)
Collada
-=-=-=- -Fixed some DAE import & export bugs -Changed Collada exporter to use the mesh loops API -Added tangent export to Collada exporter -Added triangulation option to Collada exporter -Changed a little how normalmaps are handled in shader. Not sure if it's working properly, be careful. -Fixed some strange bug with kinematic bodies #776 -Fix release compilaiton issues #782
Diffstat (limited to 'tools/editor/io_plugins')
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index ffd90cc8a3..405f8a01e8 100644
--- a/tools/editor/io_plugins/editor_import_collada.cpp
+++ b/tools/editor/io_plugins/editor_import_collada.cpp
@@ -749,7 +749,7 @@ Error ColladaImport::_create_mesh_surfaces(Ref<Mesh>& p_mesh,const Map<String,Co
Vector3 tangent =Vector3(tangent_src->array[tangent_pos+0],tangent_src->array[tangent_pos+1],tangent_src->array[tangent_pos+2]);
vertex.tangent.normal=tangent;
- vertex.tangent.d= vertex.normal.cross(tangent).dot(binormal) > 0 ? -1 : 1;
+ vertex.tangent.d= vertex.normal.cross(tangent).dot(binormal) > 0 ? 1 : -1;
}
}
@@ -784,6 +784,8 @@ Error ColladaImport::_create_mesh_surfaces(Ref<Mesh>& p_mesh,const Map<String,Co
vertex.vertex.z = -vertex.vertex.z;
SWAP( vertex.normal.z, vertex.normal.y );
vertex.normal.z = -vertex.normal.z;
+ SWAP( vertex.tangent.normal.z, vertex.tangent.normal.y );
+ vertex.tangent.normal.z = -vertex.tangent.normal.z;
}