summaryrefslogtreecommitdiffhomepage
path: root/examples/models/resources
diff options
context:
space:
mode:
authorvictorfisac <[email protected]>2018-03-10 19:10:37 +0100
committervictorfisac <[email protected]>2018-03-10 19:10:37 +0100
commit8f1d6f38506ff6449866913c6d88b0f25ca2d8f4 (patch)
tree659719ef12dbdedd9a51c85af0e43ac327c84b40 /examples/models/resources
parentdd50348b4dffe59be03538bdbaf2a3d084426e1f (diff)
parentdf50eada531b54d6771eff81cbe140f9453d54d9 (diff)
downloadraylib-8f1d6f38506ff6449866913c6d88b0f25ca2d8f4.tar.gz
raylib-8f1d6f38506ff6449866913c6d88b0f25ca2d8f4.zip
Merge branch 'master' of github.com:raysan5/raylib into fork/master
Diffstat (limited to 'examples/models/resources')
-rw-r--r--examples/models/resources/angle_gauge.pngbin11761 -> 12919 bytes
-rw-r--r--examples/models/resources/plane.pngbin4872 -> 4810 bytes
-rw-r--r--examples/models/resources/shaders/pbr.vs6
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/models/resources/angle_gauge.png b/examples/models/resources/angle_gauge.png
index 120f3601..f7871de6 100644
--- a/examples/models/resources/angle_gauge.png
+++ b/examples/models/resources/angle_gauge.png
Binary files differ
diff --git a/examples/models/resources/plane.png b/examples/models/resources/plane.png
index 9f28ddb0..58951ea3 100644
--- a/examples/models/resources/plane.png
+++ b/examples/models/resources/plane.png
Binary files differ
diff --git a/examples/models/resources/shaders/pbr.vs b/examples/models/resources/shaders/pbr.vs
index e852ac1a..885cb199 100644
--- a/examples/models/resources/shaders/pbr.vs
+++ b/examples/models/resources/shaders/pbr.vs
@@ -12,7 +12,7 @@
in vec3 vertexPosition;
in vec2 vertexTexCoord;
in vec3 vertexNormal;
-in vec3 vertexTangent;
+in vec4 vertexTangent;
// Input uniform values
uniform mat4 mvp;
@@ -28,7 +28,7 @@ out vec3 fragBinormal;
void main()
{
// Calculate binormal from vertex normal and tangent
- vec3 vertexBinormal = cross(vertexNormal, vertexTangent);
+ vec3 vertexBinormal = cross(vertexNormal, vec3(vertexTangent));
// Calculate fragment normal based on normal transformations
mat3 normalMatrix = transpose(inverse(mat3(mMatrix)));
@@ -39,7 +39,7 @@ void main()
// Send vertex attributes to fragment shader
fragTexCoord = vertexTexCoord;
fragNormal = normalize(normalMatrix*vertexNormal);
- fragTangent = normalize(normalMatrix*vertexTangent);
+ fragTangent = normalize(normalMatrix*vec3(vertexTangent));
fragTangent = normalize(fragTangent - dot(fragTangent, fragNormal)*fragNormal);
fragBinormal = normalize(normalMatrix*vertexBinormal);
fragBinormal = cross(fragNormal, fragTangent);