-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#9: Created separate grayscale and font shaders.
- Loading branch information
Ruskiy69
committed
Jul 15, 2013
1 parent
43fcfe5
commit b8e978c
Showing
5 changed files
with
60 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#version 330 core | ||
|
||
uniform sampler2D texture; | ||
|
||
smooth in vec2 fs_texc; | ||
smooth in vec4 fs_color; | ||
out vec4 out_color; | ||
|
||
void main() | ||
{ | ||
vec4 color = texture2D(texture, fs_texc); | ||
float gray = dot(color, vec3(0.299, 0.587, 0.114)); | ||
out_color = vec4(color.rgb * gray, color.a); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#version 330 core | ||
|
||
uniform sampler2D texture; | ||
|
||
smooth in vec2 fs_texc; | ||
smooth in vec4 fs_color; | ||
out vec4 out_color; | ||
|
||
uniform vec2 offset; | ||
|
||
void main() | ||
{ | ||
out_color = texture2D(texture, fs_texc + normalize(offset)); | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters