summaryrefslogtreecommitdiff
path: root/src/main/resources/assets/notenoughupdates/shaders/program/grayscale.fsh
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/assets/notenoughupdates/shaders/program/grayscale.fsh')
-rw-r--r--src/main/resources/assets/notenoughupdates/shaders/program/grayscale.fsh15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/resources/assets/notenoughupdates/shaders/program/grayscale.fsh b/src/main/resources/assets/notenoughupdates/shaders/program/grayscale.fsh
new file mode 100644
index 00000000..70875510
--- /dev/null
+++ b/src/main/resources/assets/notenoughupdates/shaders/program/grayscale.fsh
@@ -0,0 +1,15 @@
+#version 120
+
+uniform sampler2D DiffuseSampler;
+
+varying vec2 texCoord;
+
+void main(){
+ vec3 Gray = vec3(0.3, 0.59, 0.11);
+ vec4 diffuseColor = texture2D(DiffuseSampler, texCoord);
+
+ float Luma = dot(diffuseColor.rgb, Gray);
+ diffuseColor.rgb = vec3(Luma, Luma, Luma);
+
+ gl_FragColor = diffuseColor;
+}