Permalink
Browse files

A did so much shit ayy lmao

  • Loading branch information...
1 parent 76ed643 commit 6aad18178a919bf15366400984c613a665bc62f6 @HarisunnYT committed Feb 17, 2017
Showing 2,156 changed files with 634,785 additions and 104 deletions.
View
@@ -231,3 +231,5 @@ _Pvt_Extensions
# FAKE - F# Make
.fake/
+dependencies/FBXLoader/FBXLoader.lib
+dependencies/FBXLoader/FBXLoader_d.lib
View
Binary file not shown.
View
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Binary file not shown.
View
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,39 @@
+#version 410
+layout(location=0) in vec4 position;
+layout(location=1) in vec4 normal;
+layout(location=2) in vec2 uvs;
+layout(location=3) in vec4 weights;
+layout(location=4) in vec4 indices;
+out vec4 worldPosition;
+out vec4 worldNormal;
+out vec2 uv;
+
+const int MAX_BONES = 128;
+uniform mat4 bones[MAX_BONES];
+
+uniform mat4 MVP;
+uniform mat4 M;
+
+void main()
+{
+ ivec4 index = ivec4(indices);
+
+ vec4 P = bones[index.x] * position * weights.x;
+ P += bones[index.y] * position * weights.y;
+ P += bones[index.z] * position * weights.z;
+ P += bones[index.w] * position * weights.w;
+
+ worldPosition = M * P;
+ gl_Position = MVP * P;
+
+ vec4 norm = vec4(normal.xyz, 0);
+ vec4 N = bones[index.x] * norm * weights.x;
+ N += bones[index.y] * norm * weights.y;
+ N += bones[index.z] * norm * weights.z;
+ N += bones[index.w] * norm * weights.w;
+
+ worldNormal = normalize(M * N);
+
+ //worldNormal = normalize(M * vec4(normal.xyz, 0));
+ uv = uvs;
+}
@@ -11,7 +11,7 @@ uniform mat4 M;
void main()
{
- worldNormal = M * normal;
+ worldNormal = normalize(M * vec4(normal.xyz, 0));
worldPosition = M * position;
gl_Position = MVP * position;
uv = uvs;
Binary file not shown.
View
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,6 +1,7 @@
#include "gl_core_4_4.h"
#include "Texture.h"
+#define STB_IMAGE_STATIC
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
Oops, something went wrong.

0 comments on commit 6aad181

Please sign in to comment.