aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/assets/notenoughupdates/shaders/capes/cape/cape.frag
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/assets/notenoughupdates/shaders/capes/cape/cape.frag')
-rw-r--r--src/main/resources/assets/notenoughupdates/shaders/capes/cape/cape.frag16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/resources/assets/notenoughupdates/shaders/capes/cape/cape.frag b/src/main/resources/assets/notenoughupdates/shaders/capes/cape/cape.frag
new file mode 100644
index 00000000..bfc089bb
--- /dev/null
+++ b/src/main/resources/assets/notenoughupdates/shaders/capes/cape/cape.frag
@@ -0,0 +1,16 @@
+#version 120
+
+varying vec4 passColour;
+varying vec3 passNormal;
+uniform sampler2D textureIn;
+
+void main() {
+ vec4 texture = texture2D(textureIn, gl_TexCoord[0].st);
+ gl_FragColor = texture * passColour;
+
+ vec3 fakeSunNormal = normalize(vec3(0.2f,1.0f,-0.2f));
+ vec3 normNormal = normalize(passNormal);
+ float shading = max(0.6f, dot(fakeSunNormal, normNormal));
+
+ gl_FragColor = vec4(gl_FragColor.rgb*shading, gl_FragColor.a);
+} \ No newline at end of file