diff options
author | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-07-14 10:23:12 +0800 |
---|---|---|
committer | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-07-14 10:23:12 +0800 |
commit | f90f0b2f1f234d08742a4f0dd8afcd4b80e26d05 (patch) | |
tree | a3b7def680964e2015afb3e3188b955e64679f9a /src/main/resources/assets/notenoughupdates/shaders/cape.frag | |
parent | 2254c0fac78dbca807a93648c60c93281b8fb686 (diff) | |
download | NotEnoughUpdates-f90f0b2f1f234d08742a4f0dd8afcd4b80e26d05.tar.gz NotEnoughUpdates-f90f0b2f1f234d08742a4f0dd8afcd4b80e26d05.tar.bz2 NotEnoughUpdates-f90f0b2f1f234d08742a4f0dd8afcd4b80e26d05.zip |
something something capes
Diffstat (limited to 'src/main/resources/assets/notenoughupdates/shaders/cape.frag')
-rw-r--r-- | src/main/resources/assets/notenoughupdates/shaders/cape.frag | 16 |
1 files changed, 16 insertions, 0 deletions
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 |