Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- attribute vec4 a_position;
- attribute int a_color;
- attribute vec2 a_texCoord0;
- uniform mat4 u_projTrans;
- varying vec4 v_color;
- varying vec2 v_texCoords;
- void main()
- {
- int ir, ig, ib, ia;
- ir = mod(a_color, 16);
- ig = mod((a_color / 16), 16);
- ib = mod((a_color / (16 * 16)), 16);
- ia = mod((a_color / (16 * 16 * 16)), 16);
- v_color = vec4(float(ir)/15.0, float(ig)/15.0, float(ib)/15.0, 1.0);
- v_color.a = v_color.a * (16.0/15.0);
- v_texCoords = a_texCoord0;
- gl_Position = u_projTrans * a_position;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement