aboutsummaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-06-03 17:30:09 +0200
committerraysan5 <raysan5@gmail.com>2016-06-03 17:30:09 +0200
commit4dfffff19b003172c214a9b185ee29b990fd5b70 (patch)
tree58cbfd5a062b01bb76c15c1ea9079c2f25ff1aa3 /shaders
parent9417b9969d4dac2407bb9f22ebc6252094d3042a (diff)
downloadraylib-4dfffff19b003172c214a9b185ee29b990fd5b70.tar.gz
raylib-4dfffff19b003172c214a9b185ee29b990fd5b70.zip
Review uniform name
Diffstat (limited to 'shaders')
-rw-r--r--shaders/glsl100/grayscale.fs4
-rw-r--r--shaders/glsl100/template.fs4
-rw-r--r--shaders/glsl330/grayscale.fs4
-rw-r--r--shaders/glsl330/phong.fs4
-rw-r--r--shaders/glsl330/template.fs4
5 files changed, 10 insertions, 10 deletions
diff --git a/shaders/glsl100/grayscale.fs b/shaders/glsl100/grayscale.fs
index f92ec335..c76dd8af 100644
--- a/shaders/glsl100/grayscale.fs
+++ b/shaders/glsl100/grayscale.fs
@@ -8,14 +8,14 @@ varying vec4 fragColor;
// Input uniform values
uniform sampler2D texture0;
-uniform vec4 fragTintColor;
+uniform vec4 colDiffuse;
// NOTE: Add here your custom variables
void main()
{
// Texel color fetching from texture sampler
- vec4 texelColor = texture(texture0, fragTexCoord)*fragTintColor*fragColor;
+ vec4 texelColor = texture(texture0, fragTexCoord)*colDiffuse*fragColor;
// Convert texel color to grayscale using NTSC conversion weights
float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114));
diff --git a/shaders/glsl100/template.fs b/shaders/glsl100/template.fs
index a3942890..c1126423 100644
--- a/shaders/glsl100/template.fs
+++ b/shaders/glsl100/template.fs
@@ -8,7 +8,7 @@ varying vec4 fragColor;
// Input uniform values
uniform sampler2D texture0;
-uniform vec4 fragTintColor;
+uniform vec4 colDiffuse;
// NOTE: Add here your custom variables
@@ -19,5 +19,5 @@ void main()
// NOTE: Implement here your fragment shader code
- gl_FragColor = texelColor*fragTintColor;
+ gl_FragColor = texelColor*colDiffuse;
} \ No newline at end of file
diff --git a/shaders/glsl330/grayscale.fs b/shaders/glsl330/grayscale.fs
index d4a8824f..5b3e11be 100644
--- a/shaders/glsl330/grayscale.fs
+++ b/shaders/glsl330/grayscale.fs
@@ -6,7 +6,7 @@ in vec4 fragColor;
// Input uniform values
uniform sampler2D texture0;
-uniform vec4 fragTintColor;
+uniform vec4 colDiffuse;
// Output fragment color
out vec4 finalColor;
@@ -16,7 +16,7 @@ out vec4 finalColor;
void main()
{
// Texel color fetching from texture sampler
- vec4 texelColor = texture(texture0, fragTexCoord)*fragTintColor*fragColor;
+ vec4 texelColor = texture(texture0, fragTexCoord)*colDiffuse*fragColor;
// Convert texel color to grayscale using NTSC conversion weights
float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114));
diff --git a/shaders/glsl330/phong.fs b/shaders/glsl330/phong.fs
index c14b346a..b2414a15 100644
--- a/shaders/glsl330/phong.fs
+++ b/shaders/glsl330/phong.fs
@@ -6,7 +6,7 @@ in vec3 fragNormal;
// Input uniform values
uniform sampler2D texture0;
-uniform vec4 fragTintColor;
+uniform vec4 colDiffuse;
// Output fragment color
out vec4 finalColor;
@@ -44,7 +44,7 @@ vec3 DiffuseLighting(in vec3 N, in vec3 L)
// Lambertian reflection calculation
float diffuse = clamp(dot(N, L), 0, 1);
- return (fragTintColor.xyz*lightDiffuseColor*lightIntensity*diffuse);
+ return (colDiffuse.xyz*lightDiffuseColor*lightIntensity*diffuse);
}
// Calculate specular lighting component
diff --git a/shaders/glsl330/template.fs b/shaders/glsl330/template.fs
index 55b8d4a4..2e73de14 100644
--- a/shaders/glsl330/template.fs
+++ b/shaders/glsl330/template.fs
@@ -6,7 +6,7 @@ in vec4 fragColor;
// Input uniform values
uniform sampler2D texture0;
-uniform vec4 fragTintColor;
+uniform vec4 colDiffuse;
// Output fragment color
out vec4 finalColor;
@@ -20,5 +20,5 @@ void main()
// NOTE: Implement here your fragment shader code
- finalColor = texelColor*fragTintColor;
+ finalColor = texelColor*colDiffuse;
}