mojo2_fastshader.glsl 318 B

1234567891011121314151617
  1. //shader for simple unlit sprites.
  2. uniform sampler2D ColorTexture;
  3. void shader(){
  4. b3d_Ambient=texture2D( ColorTexture,b3d_Texcoord0 );
  5. #if GAMMA_CORRECTION
  6. b3d_Ambient.rgb=pow( b3d_Ambient.rgb,vec3( 2.2 ) );
  7. #endif
  8. b3d_Ambient*=b3d_Color; //apply vertex coloring
  9. b3d_Alpha=b3d_Ambient.a; //extract alpha
  10. }