mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-11 06:11:50 +09:00
moved essential resources out of the assets directory and into the jar
This commit is contained in:
16
src/shaders/quickgreyscale.frag
Normal file
16
src/shaders/quickgreyscale.frag
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
varying vec4 v_color;
|
||||
varying vec2 v_texCoords;
|
||||
uniform sampler2D u_texture;
|
||||
uniform mat4 u_projTrans;
|
||||
|
||||
void main() {
|
||||
vec3 color = texture2D(u_texture, v_texCoords).rgb;
|
||||
float gray = (3.0 * color.r + 4.0 * color.g + color.b) / 8.0;
|
||||
vec3 grayscale = vec3(gray);
|
||||
|
||||
gl_FragColor = vec4(grayscale, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user