diff options
| author | raysan5 <raysan5@gmail.com> | 2016-01-13 17:13:28 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-01-13 17:13:28 +0100 |
| commit | fb6ef2c2f4fe22552908d339cda541453e43faec (patch) | |
| tree | 53d86522f6f1a5256e097a2e7bc82ce3e0101526 /shaders/gl330/grayscale.fs | |
| parent | bb49102a4b5ae7bf6a34b437b133e8c5e3557f8d (diff) | |
| download | raylib-fb6ef2c2f4fe22552908d339cda541453e43faec.tar.gz raylib-fb6ef2c2f4fe22552908d339cda541453e43faec.zip | |
Vertex shaders optimization
Diffstat (limited to 'shaders/gl330/grayscale.fs')
| -rw-r--r-- | shaders/gl330/grayscale.fs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shaders/gl330/grayscale.fs b/shaders/gl330/grayscale.fs index 38337e00..af50b8c1 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 = texture2D(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 |
