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
This commit is contained in:
parent
13a848e332
commit
a84ba9c853
25 changed files with 363 additions and 198 deletions
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue