summaryrefslogtreecommitdiffhomepage
path: root/examples/shaders
diff options
context:
space:
mode:
authorRay <[email protected]>2017-08-25 01:53:15 +0200
committerGitHub <[email protected]>2017-08-25 01:53:15 +0200
commitc074783861994fb9f3bcc618b776a41dc57b50d0 (patch)
tree63fdca2144cd13f6a537e76d6a3f8712ae106ead /examples/shaders
parent910b4b5d53d9a904070807de5e8a66edadd939e3 (diff)
parent0fc1323c80c2501c36741c05fd771ac1d001d049 (diff)
downloadraylib-c074783861994fb9f3bcc618b776a41dc57b50d0.tar.gz
raylib-c074783861994fb9f3bcc618b776a41dc57b50d0.zip
Merge pull request #346 from raysan5/develop
Integrate Develop branch
Diffstat (limited to 'examples/shaders')
-rw-r--r--examples/shaders/resources/shaders/glsl100/base.vs4
-rw-r--r--examples/shaders/resources/shaders/glsl330/base.vs4
-rw-r--r--examples/shaders/shaders_custom_uniform.c2
-rw-r--r--examples/shaders/shaders_model_shader.c4
-rw-r--r--examples/shaders/shaders_postprocessing.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/examples/shaders/resources/shaders/glsl100/base.vs b/examples/shaders/resources/shaders/glsl100/base.vs
index e9386939..4be76b9e 100644
--- a/examples/shaders/resources/shaders/glsl100/base.vs
+++ b/examples/shaders/resources/shaders/glsl100/base.vs
@@ -7,7 +7,7 @@ attribute vec3 vertexNormal;
attribute vec4 vertexColor;
// Input uniform values
-uniform mat4 mvpMatrix;
+uniform mat4 mvp;
// Output vertex attributes (to fragment shader)
varying vec2 fragTexCoord;
@@ -22,5 +22,5 @@ void main()
fragColor = vertexColor;
// Calculate final vertex position
- gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
+ gl_Position = mvp*vec4(vertexPosition, 1.0);
} \ No newline at end of file
diff --git a/examples/shaders/resources/shaders/glsl330/base.vs b/examples/shaders/resources/shaders/glsl330/base.vs
index 638cb8ae..f3099e82 100644
--- a/examples/shaders/resources/shaders/glsl330/base.vs
+++ b/examples/shaders/resources/shaders/glsl330/base.vs
@@ -7,7 +7,7 @@ in vec3 vertexNormal;
in vec4 vertexColor;
// Input uniform values
-uniform mat4 mvpMatrix;
+uniform mat4 mvp;
// Output vertex attributes (to fragment shader)
out vec2 fragTexCoord;
@@ -22,5 +22,5 @@ void main()
fragColor = vertexColor;
// Calculate final vertex position
- gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
+ gl_Position = mvp*vec4(vertexPosition, 1.0);
} \ No newline at end of file
diff --git a/examples/shaders/shaders_custom_uniform.c b/examples/shaders/shaders_custom_uniform.c
index 89f87df9..a0f6fd22 100644
--- a/examples/shaders/shaders_custom_uniform.c
+++ b/examples/shaders/shaders_custom_uniform.c
@@ -34,7 +34,7 @@ int main()
Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model
Texture2D texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture (diffuse map)
- dwarf.material.texDiffuse = texture; // Set dwarf model diffuse texture
+ dwarf.material.maps[MAP_DIFFUSE].texture = texture; // Set dwarf model diffuse texture
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
diff --git a/examples/shaders/shaders_model_shader.c b/examples/shaders/shaders_model_shader.c
index 51e9c1b3..f1a349c6 100644
--- a/examples/shaders/shaders_model_shader.c
+++ b/examples/shaders/shaders_model_shader.c
@@ -37,8 +37,8 @@ int main()
Shader shader = LoadShader("resources/shaders/glsl330/base.vs",
"resources/shaders/glsl330/grayscale.fs"); // Load model shader
- dwarf.material.shader = shader; // Set shader effect to 3d model
- dwarf.material.texDiffuse = texture; // Bind texture to model
+ dwarf.material.shader = shader; // Set shader effect to 3d model
+ dwarf.material.maps[MAP_DIFFUSE].texture = texture; // Bind texture to model
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
diff --git a/examples/shaders/shaders_postprocessing.c b/examples/shaders/shaders_postprocessing.c
index bb239efa..ae77a723 100644
--- a/examples/shaders/shaders_postprocessing.c
+++ b/examples/shaders/shaders_postprocessing.c
@@ -76,7 +76,7 @@ int main()
Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model
Texture2D texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture (diffuse map)
- dwarf.material.texDiffuse = texture; // Set dwarf model diffuse texture
+ dwarf.material.maps[MAP_DIFFUSE].texture = texture; // Set dwarf model diffuse texture
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position