- Implemented KRBehavior class

- Imported animations now have the auto_play and loop flags set to false by default
- Implemented Pre-Rotation, Post-Rotation, Scale Offset, Rotate Offset, Scale Pivot, and Rotate Pivot transform attributes.
- Reduced use of euler angles, replacing them with Quaternions where possible
- Fixed bug with incorrect Y rotation in KRMat4::rotate
- Material / GL Context changes have been optimized to reduce redundant glUniform calls
- New KRMesh format implemented, with support for importing BindPose matrices
- Fixed bug that caused a duplicate "default_camera" node to be added rather than picking up an existing "default_camera" node imported from FBX.  This enables animations to drive the camera correctly.
- Implemented KRVector3::Scale
- Implemented KRVector3::KRVector3(double *v);
This commit is contained in:
2013-05-24 12:20:47 -07:00
parent 1c7aea8d50
commit e0aaafc327
42 changed files with 1160 additions and 628 deletions

View File

@@ -29,6 +29,7 @@
// or implied, of Kearwood Gilbert.
//
attribute highp vec3 vertex_position, vertex_normal;
#if HAS_NORMAL_MAP == 1
attribute highp vec3 vertex_tangent;
@@ -171,8 +172,8 @@ void main()
mediump vec4 scaled_bone_indexes = bone_indexes;
mediump vec4 scaled_bone_weights = bone_weights;
//scaled_bone_indexes = vec4(1.0, 0.0, 0.0, 0.0);
scaled_bone_weights = vec4(1.0, 0.0, 0.0, 0.0);
//scaled_bone_indexes = vec4(0.0, 0.0, 0.0, 0.0);
//scaled_bone_weights = vec4(1.0, 0.0, 0.0, 0.0);
highp mat4 skin_matrix =
bone_transforms[ int(scaled_bone_indexes.x) ] * scaled_bone_weights.x +

View File

@@ -28,11 +28,11 @@
varying mediump vec2 textureCoordinate;
attribute vec4 vertex_position;
attribute lowp vec4 vertex_uv;
attribute lowp vec2 vertex_uv;
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
void main()
{
gl_Position = /*mvp_matrix * */vertex_position;
textureCoordinate = vertex_uv.xy;
textureCoordinate = vertex_uv;
}