Created
February 3, 2022 06:31
-
-
Save xaqbr/4595e1729849cf627d74daca1fffafda to your computer and use it in GitHub Desktop.
Code adopted from Complementary shaders (https://www.curseforge.com/minecraft/customization/complementary-shaders)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 120 | |
/* DRAWBUFFERS:02 */ //0=gcolor, 2=gnormal for normals | |
//Varyings// | |
varying vec2 texCoord; | |
//Uniforms// | |
uniform sampler2D texture; | |
//Program// | |
void main() { | |
//Texture | |
vec4 albedo = texture2D(texture, texCoord); | |
#if ALPHA_BLEND == 1 | |
albedo.rgb = pow(albedo.rgb,vec3(2.2)) * 2.25; | |
#endif | |
#ifdef WHITE_WORLD | |
albedo.a = 0.0; | |
#endif | |
/* DRAWBUFFERS:0 */ | |
gl_FragData[0] = albedo; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment