mirror of
https://github.com/edubart/otclient.git
synced 2025-12-01 07:36:49 +01:00
experimental map shaders
This commit is contained in:
14
modules/game_shaders/shaders/grayscale.frag
Normal file
14
modules/game_shaders/shaders/grayscale.frag
Normal file
@@ -0,0 +1,14 @@
|
||||
uniform float u_Time;
|
||||
uniform sampler2D u_Tex0;
|
||||
varying vec2 v_TexCoord;
|
||||
|
||||
vec4 grayscale(vec4 color)
|
||||
{
|
||||
float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
|
||||
return vec4(gray, gray, gray, 1);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = grayscale(texture2D(u_Tex0, v_TexCoord));
|
||||
}
|
||||
Reference in New Issue
Block a user