Ignore:
Timestamp:
06/01/15 20:39:35 (10 years ago)
Author:
epyon
Message:
  • massive C++11 update (upgrade to MSVC 2015)
  • array/dynamic_array - fully based on memory containers (will be moved) (in progress)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/formats/obj_loader.cc

    r376 r382  
    280280                for ( nv::size_t a = 0; a < count; ++a )
    281281                {
    282                         const vec3& n = m_data[a].normal;
    283                         const vec3& t = tan1[a];
    284                         if ( ! (t.x == 0.0f && t.y == 0.0f && t.z == 0.0f) )
     282                        const vec3& nv = m_data[a].normal;
     283                        const vec3& tv = tan1[a];
     284                        if ( ! (tv.x == 0.0f && tv.y == 0.0f && tv.z == 0.0f) )
    285285                        {
    286                                 m_data[a].tangent    = vec4( glm::normalize(t - n * glm::dot( n, t )), 0.0f );
    287                                 m_data[a].tangent[3] = (glm::dot(glm::cross(n, t), tan2[a]) < 0.0f) ? -1.0f : 1.0f;
     286                                m_data[a].tangent    = vec4( glm::normalize(tv - nv * glm::dot( nv, tv )), 0.0f );
     287                                m_data[a].tangent[3] = (glm::dot(glm::cross(nv, tv), tan2[a]) < 0.0f) ? -1.0f : 1.0f;
    288288                        }
    289289                }
Note: See TracChangeset for help on using the changeset viewer.