summaryrefslogtreecommitdiffhomepage
path: root/examples/models
diff options
context:
space:
mode:
authorRay <[email protected]>2021-06-25 13:35:43 +0200
committerRay <[email protected]>2021-06-25 13:35:43 +0200
commite0720a0a5577cfb69ecb34fb4bd89e59f40f6b29 (patch)
tree57779983514bb66665ab497339c6348143b5ee3f /examples/models
parentd4c03b47ec625c2de723ef686d8ec306a1784ec1 (diff)
downloadraylib-e0720a0a5577cfb69ecb34fb4bd89e59f40f6b29.tar.gz
raylib-e0720a0a5577cfb69ecb34fb4bd89e59f40f6b29.zip
WARNING: REVIEWED: Default shader uniform names
When a shader is loaded, by default, several locations are tried to be set automatically.
Diffstat (limited to 'examples/models')
-rw-r--r--examples/models/resources/shaders/glsl100/cubemap.vs6
-rw-r--r--examples/models/resources/shaders/glsl100/skybox.vs10
-rw-r--r--examples/models/resources/shaders/glsl330/cubemap.vs6
-rw-r--r--examples/models/resources/shaders/glsl330/skybox.vs10
4 files changed, 16 insertions, 16 deletions
diff --git a/examples/models/resources/shaders/glsl100/cubemap.vs b/examples/models/resources/shaders/glsl100/cubemap.vs
index fd8d17e1..6f486fba 100644
--- a/examples/models/resources/shaders/glsl100/cubemap.vs
+++ b/examples/models/resources/shaders/glsl100/cubemap.vs
@@ -4,8 +4,8 @@
attribute vec3 vertexPosition;
// Input uniform values
-uniform mat4 projection;
-uniform mat4 view;
+uniform mat4 matProjection;
+uniform mat4 matView;
// Output vertex attributes (to fragment shader)
varying vec3 fragPosition;
@@ -16,5 +16,5 @@ void main()
fragPosition = vertexPosition;
// Calculate final vertex position
- gl_Position = projection*view*vec4(vertexPosition, 1.0);
+ gl_Position = matProjection*matView*vec4(vertexPosition, 1.0);
}
diff --git a/examples/models/resources/shaders/glsl100/skybox.vs b/examples/models/resources/shaders/glsl100/skybox.vs
index 0d00d54f..e440ace3 100644
--- a/examples/models/resources/shaders/glsl100/skybox.vs
+++ b/examples/models/resources/shaders/glsl100/skybox.vs
@@ -4,8 +4,8 @@
attribute vec3 vertexPosition;
// Input uniform values
-uniform mat4 projection;
-uniform mat4 view;
+uniform mat4 matProjection;
+uniform mat4 matView;
// Output vertex attributes (to fragment shader)
varying vec3 fragPosition;
@@ -16,9 +16,9 @@ void main()
fragPosition = vertexPosition;
// Remove translation from the view matrix
- mat4 rotView = mat4(mat3(view));
- vec4 clipPos = projection*rotView*vec4(vertexPosition, 1.0);
+ mat4 rotView = mat4(mat3(matView));
+ vec4 clipPos = matProjection*rotView*vec4(vertexPosition, 1.0);
// Calculate final vertex position
- gl_Position = clipPos.xyzw;
+ gl_Position = clipPos;
}
diff --git a/examples/models/resources/shaders/glsl330/cubemap.vs b/examples/models/resources/shaders/glsl330/cubemap.vs
index d3565dfd..d71f8086 100644
--- a/examples/models/resources/shaders/glsl330/cubemap.vs
+++ b/examples/models/resources/shaders/glsl330/cubemap.vs
@@ -4,8 +4,8 @@
in vec3 vertexPosition;
// Input uniform values
-uniform mat4 projection;
-uniform mat4 view;
+uniform mat4 matProjection;
+uniform mat4 matView;
// Output vertex attributes (to fragment shader)
out vec3 fragPosition;
@@ -16,5 +16,5 @@ void main()
fragPosition = vertexPosition;
// Calculate final vertex position
- gl_Position = projection*view*vec4(vertexPosition, 1.0);
+ gl_Position = matProjection*matView*vec4(vertexPosition, 1.0);
}
diff --git a/examples/models/resources/shaders/glsl330/skybox.vs b/examples/models/resources/shaders/glsl330/skybox.vs
index 6279bc49..f41d4692 100644
--- a/examples/models/resources/shaders/glsl330/skybox.vs
+++ b/examples/models/resources/shaders/glsl330/skybox.vs
@@ -4,8 +4,8 @@
in vec3 vertexPosition;
// Input uniform values
-uniform mat4 projection;
-uniform mat4 view;
+uniform mat4 matProjection;
+uniform mat4 matView;
// Output vertex attributes (to fragment shader)
out vec3 fragPosition;
@@ -16,9 +16,9 @@ void main()
fragPosition = vertexPosition;
// Remove translation from the view matrix
- mat4 rotView = mat4(mat3(view));
- vec4 clipPos = projection*rotView*vec4(vertexPosition, 1.0);
+ mat4 rotView = mat4(mat3(matView));
+ vec4 clipPos = matProjection*rotView*vec4(vertexPosition, 1.0);
// Calculate final vertex position
- gl_Position = clipPos.xyzw;
+ gl_Position = clipPos;
}