From f90f0b2f1f234d08742a4f0dd8afcd4b80e26d05 Mon Sep 17 00:00:00 2001 From: Moulberry Date: Tue, 14 Jul 2020 10:23:12 +0800 Subject: something something capes --- .../resources/assets/notenoughupdates/shaders/cape.frag | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/main/resources/assets/notenoughupdates/shaders/cape.frag (limited to 'src/main/resources/assets/notenoughupdates/shaders/cape.frag') diff --git a/src/main/resources/assets/notenoughupdates/shaders/cape.frag b/src/main/resources/assets/notenoughupdates/shaders/cape.frag new file mode 100644 index 00000000..cbe00c70 --- /dev/null +++ b/src/main/resources/assets/notenoughupdates/shaders/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,1f,-0.2f)); + vec3 normNormal = normalize(passNormal); + float shading = max(0.6f, dot(fakeSunNormal, normNormal)); + + gl_FragColor = vec4(gl_FragColor.rgb*shading, gl_FragColor.a);//gl_FragColor.rgb*shading +} \ No newline at end of file -- cgit