Skip to content

Instantly share code, notes, and snippets.

@xaqbr
Created February 3, 2022 06:31
Show Gist options
  • Save xaqbr/4595e1729849cf627d74daca1fffafda to your computer and use it in GitHub Desktop.
Save xaqbr/4595e1729849cf627d74daca1fffafda to your computer and use it in GitHub Desktop.
#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