diff options
Diffstat (limited to 'shaders')
30 files changed, 197 insertions, 96 deletions
diff --git a/shaders/gl330/base.vs b/shaders/gl330/base.vs index 59eae0a0..b0f930b7 100644 --- a/shaders/gl330/base.vs +++ b/shaders/gl330/base.vs @@ -6,8 +6,7 @@ in vec3 vertexNormal; out vec2 fragTexCoord; -uniform mat4 projectionMatrix; -uniform mat4 modelviewMatrix; +uniform mat4 mvpMatrix; // NOTE: Add here your custom variables @@ -15,5 +14,5 @@ void main() { fragTexCoord = vertexTexCoord; - gl_Position = projectionMatrix*modelviewMatrix*vec4(vertexPosition, 1.0); + gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); }
\ No newline at end of file diff --git a/shaders/gl330/bloom.fs b/shaders/gl330/bloom.fs index f9cebe18..34b6295c 100644 --- a/shaders/gl330/bloom.fs +++ b/shaders/gl330/bloom.fs @@ -5,7 +5,7 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables @@ -18,23 +18,23 @@ void main() { for (int j = -3; j < 3; j++) { - sum += texture2D(texture0, fragTexCoord + vec2(j, i)*0.004) * 0.25; + sum += texture(texture0, fragTexCoord + vec2(j, i)*0.004) * 0.25; } } - if (texture2D(texture0, fragTexCoord).r < 0.3) + if (texture(texture0, fragTexCoord).r < 0.3) { - tc = sum*sum*0.012 + texture2D(texture0, fragTexCoord); + tc = sum*sum*0.012 + texture(texture0, fragTexCoord); } else { - if (texture2D(texture0, fragTexCoord).r < 0.5) + if (texture(texture0, fragTexCoord).r < 0.5) { - tc = sum*sum*0.009 + texture2D(texture0, fragTexCoord); + tc = sum*sum*0.009 + texture(texture0, fragTexCoord); } else { - tc = sum*sum*0.0075 + texture2D(texture0, fragTexCoord); + tc = sum*sum*0.0075 + texture(texture0, fragTexCoord); } } diff --git a/shaders/gl330/blur.fs b/shaders/gl330/blur.fs index b4e5bd2b..44ea42b1 100644 --- a/shaders/gl330/blur.fs +++ b/shaders/gl330/blur.fs @@ -5,24 +5,24 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables -const float renderWidth = 1280; -const float renderHeight = 720; +const float renderWidth = 1280.0; +const float renderHeight = 720.0; float offset[3] = float[](0.0, 1.3846153846, 3.2307692308); float weight[3] = float[](0.2270270270, 0.3162162162, 0.0702702703); void main() { - vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight[0]; + vec3 tc = texture(texture0, fragTexCoord).rgb*weight[0]; for (int i = 1; i < 3; i++) { - tc += texture2D(texture0, fragTexCoord + vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; - tc += texture2D(texture0, fragTexCoord - vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; + tc += texture(texture0, fragTexCoord + vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; + tc += texture(texture0, fragTexCoord - vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; } fragColor = vec4(tc, 1.0); diff --git a/shaders/gl330/cross_hatching.fs b/shaders/gl330/cross_hatching.fs index e2362212..6f5df964 100644 --- a/shaders/gl330/cross_hatching.fs +++ b/shaders/gl330/cross_hatching.fs @@ -5,20 +5,20 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables -float hatchOffsetY = 5.0f; -float lumThreshold01 = 0.9f; -float lumThreshold02 = 0.7f; -float lumThreshold03 = 0.5f; -float lumThreshold04 = 0.3f; +float hatchOffsetY = 5.0; +float lumThreshold01 = 0.9; +float lumThreshold02 = 0.7; +float lumThreshold03 = 0.5; +float lumThreshold04 = 0.3; void main() { vec3 tc = vec3(1.0, 1.0, 1.0); - float lum = length(texture2D(texture0, fragTexCoord).rgb); + float lum = length(texture(texture0, fragTexCoord).rgb); if (lum < lumThreshold01) { diff --git a/shaders/gl330/cross_stitching.fs b/shaders/gl330/cross_stitching.fs index 041bf1dc..dcb26e79 100644 --- a/shaders/gl330/cross_stitching.fs +++ b/shaders/gl330/cross_stitching.fs @@ -5,14 +5,14 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables -const float renderWidth = 1280; -const float renderHeight = 720; +const float renderWidth = 1280.0; +const float renderHeight = 720.0; -float stitchingSize = 6.0f; +float stitchingSize = 6.0; uniform int invert = 0; @@ -35,11 +35,11 @@ vec4 PostFX(sampler2D tex, vec2 uv) if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y))))) { if (invert == 1) c = vec4(0.2, 0.15, 0.05, 1.0); - else c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; + else c = texture(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; } else { - if (invert == 1) c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; + if (invert == 1) c = texture(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; else c = vec4(0.0, 0.0, 0.0, 1.0); } diff --git a/shaders/gl330/dream_vision.fs b/shaders/gl330/dream_vision.fs index de9c04eb..0ea4ce20 100644 --- a/shaders/gl330/dream_vision.fs +++ b/shaders/gl330/dream_vision.fs @@ -5,27 +5,27 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables void main() { - vec4 color = texture2D(texture0, fragTexCoord); - - color += texture2D(texture0, fragTexCoord + 0.001); - color += texture2D(texture0, fragTexCoord + 0.003); - color += texture2D(texture0, fragTexCoord + 0.005); - color += texture2D(texture0, fragTexCoord + 0.007); - color += texture2D(texture0, fragTexCoord + 0.009); - color += texture2D(texture0, fragTexCoord + 0.011); - - color += texture2D(texture0, fragTexCoord - 0.001); - color += texture2D(texture0, fragTexCoord - 0.003); - color += texture2D(texture0, fragTexCoord - 0.005); - color += texture2D(texture0, fragTexCoord - 0.007); - color += texture2D(texture0, fragTexCoord - 0.009); - color += texture2D(texture0, fragTexCoord - 0.011); + vec4 color = texture(texture0, fragTexCoord); + + color += texture(texture0, fragTexCoord + 0.001); + color += texture(texture0, fragTexCoord + 0.003); + color += texture(texture0, fragTexCoord + 0.005); + color += texture(texture0, fragTexCoord + 0.007); + color += texture(texture0, fragTexCoord + 0.009); + color += texture(texture0, fragTexCoord + 0.011); + + color += texture(texture0, fragTexCoord - 0.001); + color += texture(texture0, fragTexCoord - 0.003); + color += texture(texture0, fragTexCoord - 0.005); + color += texture(texture0, fragTexCoord - 0.007); + color += texture(texture0, fragTexCoord - 0.009); + color += texture(texture0, fragTexCoord - 0.011); color.rgb = vec3((color.r + color.g + color.b)/3.0); color = color/9.5; diff --git a/shaders/gl330/fisheye.fs b/shaders/gl330/fisheye.fs index d0e42cca..5bd9abf4 100644 --- a/shaders/gl330/fisheye.fs +++ b/shaders/gl330/fisheye.fs @@ -5,7 +5,7 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables @@ -13,7 +13,7 @@ const float PI = 3.1415926535; void main() { - float aperture = 178.0f; + float aperture = 178.0; float apertureHalf = 0.5 * aperture * (PI / 180.0); float maxFactor = sin(apertureHalf); @@ -36,5 +36,5 @@ void main() uv = fragTexCoord.xy; } - fragColor = texture2D(texture0, uv); + fragColor = texture(texture0, uv); }
\ No newline at end of file diff --git a/shaders/gl330/grayscale.fs b/shaders/gl330/grayscale.fs index 38337e00..b3a695bf 100644 --- a/shaders/gl330/grayscale.fs +++ b/shaders/gl330/grayscale.fs @@ -5,16 +5,16 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables void main() { - vec4 base = texture2D(texture0, fragTexCoord)*tintColor; + vec4 base = texture(texture0, fragTexCoord)*fragTintColor; // Convert to grayscale using NTSC conversion weights float gray = dot(base.rgb, vec3(0.299, 0.587, 0.114)); - fragColor = vec4(gray, gray, gray, tintColor.a); + fragColor = vec4(gray, gray, gray, fragTintColor.a); }
\ No newline at end of file diff --git a/shaders/gl330/phong.fs b/shaders/gl330/phong.fs new file mode 100644 index 00000000..75b7e6d7 --- /dev/null +++ b/shaders/gl330/phong.fs @@ -0,0 +1,76 @@ +#version 330 + +// Vertex shader input data +in vec2 fragTexCoord; +in vec3 fragNormal; + +// Diffuse data +uniform sampler2D texture0; +uniform vec4 fragTintColor; + +// Light attributes +uniform vec3 light_ambientColor = vec3(0.6, 0.3, 0); +uniform vec3 light_diffuseColor = vec3(1, 0.5, 0); +uniform vec3 light_specularColor = vec3(0, 1, 0); +uniform float light_intensity = 1; +uniform float light_specIntensity = 1; + +// Material attributes +uniform vec3 mat_ambientColor = vec3(1, 1, 1); +uniform vec3 mat_specularColor = vec3(1, 1, 1); +uniform float mat_glossiness = 50; + +// World attributes +uniform vec3 lightPos; +uniform vec3 cameraPos; + +// Fragment shader output data +out vec4 fragColor; + +vec3 AmbientLighting() +{ + return mat_ambientColor * light_ambientColor; +} + +vec3 DiffuseLighting(in vec3 N, in vec3 L) +{ + // Lambertian reflection calculation + float diffuse = clamp(dot(N, L), 0, 1); + + return tintColor.xyz * light_diffuseColor * light_intensity * diffuse; +} + +vec3 SpecularLighting(in vec3 N, in vec3 L, in vec3 V) +{ + float specular = 0; + + // Calculate specular reflection only if the surface is oriented to the light source + if(dot(N, L) > 0) + { + // Calculate half vector + vec3 H = normalize(L + V); + + // Calculate specular intensity + specular = pow(dot(N, H), 3 + mat_glossiness); + } + + return mat_specularColor * light_specularColor * light_specIntensity * specular; +} + +void main() +{ + // Normalize input vectors + vec3 L = normalize(lightPos); + vec3 V = normalize(cameraPos); + vec3 N = normalize(fragNormal); + + vec3 ambient = AmbientLighting(); + vec3 diffuse = DiffuseLighting(N, L); + vec3 specular = SpecularLighting(N, L, V); + + // Get base color from texture + vec4 textureColor = texture(texture0, fragTexCoord); + vec3 finalColor = textureColor.rgb; + + fragColor = vec4(finalColor * (ambient + diffuse + specular), textureColor.a); +}
\ No newline at end of file diff --git a/shaders/gl330/phong.vs b/shaders/gl330/phong.vs new file mode 100644 index 00000000..ee6d34bf --- /dev/null +++ b/shaders/gl330/phong.vs @@ -0,0 +1,27 @@ +#version 330 + +// Vertex input data +in vec3 vertexPosition; +in vec2 vertexTexCoord; +in vec3 vertexNormal; + +// Projection and model data +uniform mat4 mvpMatrix; +uniform mat4 modelMatrix; + +// Attributes to fragment shader +out vec2 fragTexCoord; +out vec3 fragNormal; + +void main() +{ + // Send texture coord to fragment shader + fragTexCoord = vertexTexCoord; + + // Calculate view vector normal from model + mat3 normalMatrix = transpose(inverse(mat3(modelMatrix))); + fragNormal = normalize(normalMatrix*vertexNormal); + + // Calculate final vertex position + gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); +}
\ No newline at end of file diff --git a/shaders/gl330/pixel.fs b/shaders/gl330/pixel.fs index ec9e13d7..aa5a22fe 100644 --- a/shaders/gl330/pixel.fs +++ b/shaders/gl330/pixel.fs @@ -5,15 +5,15 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables -const float renderWidth = 1280; -const float renderHeight = 720; +const float renderWidth = 1280.0; +const float renderHeight = 720.0; -uniform float pixelWidth = 5.0f; -uniform float pixelHeight = 5.0f; +uniform float pixelWidth = 5.0; +uniform float pixelHeight = 5.0; void main() { @@ -22,7 +22,7 @@ void main() vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy)); - vec3 tc = texture2D(texture0, coord).rgb; + vec3 tc = texture(texture0, coord).rgb; fragColor = vec4(tc, 1.0); }
\ No newline at end of file diff --git a/shaders/gl330/posterization.fs b/shaders/gl330/posterization.fs index 652cf609..5215bd8b 100644 --- a/shaders/gl330/posterization.fs +++ b/shaders/gl330/posterization.fs @@ -5,16 +5,16 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables -float gamma = 0.6f; -float numColors = 8.0f; +float gamma = 0.6; +float numColors = 8.0; void main() { - vec3 color = texture2D(texture0, fragTexCoord.xy).rgb; + vec3 color = texture(texture0, fragTexCoord.xy).rgb; color = pow(color, vec3(gamma, gamma, gamma)); color = color*numColors; diff --git a/shaders/gl330/predator.fs b/shaders/gl330/predator.fs index 77882917..85c93d0c 100644 --- a/shaders/gl330/predator.fs +++ b/shaders/gl330/predator.fs @@ -5,13 +5,13 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables void main() { - vec3 color = texture2D(texture0, fragTexCoord).rgb; + vec3 color = texture(texture0, fragTexCoord).rgb; vec3 colors[3]; colors[0] = vec3(0.0, 0.0, 1.0); colors[1] = vec3(1.0, 1.0, 0.0); diff --git a/shaders/gl330/scanlines.fs b/shaders/gl330/scanlines.fs index 7f33f882..0c89e610 100644 --- a/shaders/gl330/scanlines.fs +++ b/shaders/gl330/scanlines.fs @@ -5,12 +5,12 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables -float offset = 0; -float frequency = 720/3.0; +float offset = 0.0; +float frequency = 720.0/3.0; uniform float time; @@ -21,7 +21,7 @@ void main (void) float tval = 0; //time vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval)); - vec4 color = texture2D(texture0, fragTexCoord); + vec4 color = texture(texture0, fragTexCoord); color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0); color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y); @@ -35,7 +35,7 @@ void main (void) float globalPos = (fragTexCoord.y + offset) * frequency; float wavePos = cos((fract(globalPos) - 0.5)*3.14); - vec4 color = texture2D(texture0, fragTexCoord); + vec4 color = texture(texture0, fragTexCoord); - fragColor = mix(vec4(0, 0.3, 0, 0), color, wavePos); + fragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos); }
\ No newline at end of file diff --git a/shaders/gl330/swirl.fs b/shaders/gl330/swirl.fs index 18a47cec..19d7468b 100644 --- a/shaders/gl330/swirl.fs +++ b/shaders/gl330/swirl.fs @@ -5,17 +5,17 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables -const float renderWidth = 1280; -const float renderHeight = 720; +const float renderWidth = 1280.0; +const float renderHeight = 720.0; float radius = 250.0; float angle = 0.8; -uniform vec2 center = vec2(200, 200); +uniform vec2 center = vec2(200.0, 200.0); void main (void) { @@ -35,7 +35,7 @@ void main (void) } tc += center; - vec3 color = texture2D(texture0, tc/texSize).rgb; + vec3 color = texture(texture0, tc/texSize).rgb; fragColor = vec4(color, 1.0);; }
\ No newline at end of file diff --git a/shaders/gl330/template.fs b/shaders/gl330/template.fs index 92221959..ad7210a4 100644 --- a/shaders/gl330/template.fs +++ b/shaders/gl330/template.fs @@ -5,15 +5,15 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables void main() { - vec4 texelColor = texture2D(texture0, fragTexCoord); + vec4 texelColor = texture(texture0, fragTexCoord); // NOTE: Implement here your fragment shader code - fragColor = texelColor*tintColor; + fragColor = texelColor*fragTintColor; } diff --git a/shaders/gles100/base.vs b/shaders/gles100/base.vs index eff89c56..9f339382 100644 --- a/shaders/gles100/base.vs +++ b/shaders/gles100/base.vs @@ -6,8 +6,7 @@ attribute vec3 vertexNormal; varying vec2 fragTexCoord; -uniform mat4 projectionMatrix; -uniform mat4 modelviewMatrix; +uniform mat4 mvpMatrix; // NOTE: Add here your custom variables @@ -17,5 +16,5 @@ void main() fragTexCoord = vertexTexCoord; - gl_Position = projectionMatrix*modelviewMatrix*vec4(vertexPosition, 1.0); + gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); }
\ No newline at end of file diff --git a/shaders/gles100/bloom.fs b/shaders/gles100/bloom.fs index eba44d41..33754c7e 100644 --- a/shaders/gles100/bloom.fs +++ b/shaders/gles100/bloom.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/blur.fs b/shaders/gles100/blur.fs index 3c865ca0..a1069c6f 100644 --- a/shaders/gles100/blur.fs +++ b/shaders/gles100/blur.fs @@ -4,7 +4,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/cross_hatching.fs b/shaders/gles100/cross_hatching.fs index c308acb6..cf01b65e 100644 --- a/shaders/gles100/cross_hatching.fs +++ b/shaders/gles100/cross_hatching.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/cross_stitching.fs b/shaders/gles100/cross_stitching.fs index 09b3ad4a..f1afef04 100644 --- a/shaders/gles100/cross_stitching.fs +++ b/shaders/gles100/cross_stitching.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/dream_vision.fs b/shaders/gles100/dream_vision.fs index 6cbdfcd6..bb828970 100644 --- a/shaders/gles100/dream_vision.fs +++ b/shaders/gles100/dream_vision.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/fisheye.fs b/shaders/gles100/fisheye.fs index a21257c7..e7a4485c 100644 --- a/shaders/gles100/fisheye.fs +++ b/shaders/gles100/fisheye.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/grayscale.fs b/shaders/gles100/grayscale.fs index 07e79614..e55545e2 100644 --- a/shaders/gles100/grayscale.fs +++ b/shaders/gles100/grayscale.fs @@ -5,16 +5,16 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables void main() { - vec4 base = texture2D(texture0, fragTexCoord)*tintColor; + vec4 base = texture2D(texture0, fragTexCoord)*fragTintColor; // Convert to grayscale using NTSC conversion weights float gray = dot(base.rgb, vec3(0.299, 0.587, 0.114)); - gl_FragColor = vec4(gray, gray, gray, tintColor.a); + gl_FragColor = vec4(gray, gray, gray, fragTintColor.a); }
\ No newline at end of file diff --git a/shaders/gles100/pixel.fs b/shaders/gles100/pixel.fs index eceff6e3..552e8900 100644 --- a/shaders/gles100/pixel.fs +++ b/shaders/gles100/pixel.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/posterization.fs b/shaders/gles100/posterization.fs index f635305e..4f4c4b93 100644 --- a/shaders/gles100/posterization.fs +++ b/shaders/gles100/posterization.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/predator.fs b/shaders/gles100/predator.fs index c85048a6..2fbdc7af 100644 --- a/shaders/gles100/predator.fs +++ b/shaders/gles100/predator.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/scanlines.fs b/shaders/gles100/scanlines.fs index 56a6f694..85de158d 100644 --- a/shaders/gles100/scanlines.fs +++ b/shaders/gles100/scanlines.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/swirl.fs b/shaders/gles100/swirl.fs index b50ed39e..b0d54b23 100644 --- a/shaders/gles100/swirl.fs +++ b/shaders/gles100/swirl.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables diff --git a/shaders/gles100/template.fs b/shaders/gles100/template.fs index 9d9499f3..1f4b8ccf 100644 --- a/shaders/gles100/template.fs +++ b/shaders/gles100/template.fs @@ -5,7 +5,7 @@ precision mediump float; varying vec2 fragTexCoord; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables @@ -15,5 +15,5 @@ void main() // NOTE: Implement here your fragment shader code - gl_FragColor = texelColor*tintColor; + gl_FragColor = texelColor*fragTintColor; }
\ No newline at end of file |
