Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ------------------ BasicVertexShader ------------------
- #version 100
- precision mediump float;
- attribute vec4 a_Position;
- attribute vec2 a_TexCoord;
- uniform mat4 worldMatrix;
- varying vec2 v_TexCoord;
- void main()
- {
- v_TexCoord = a_TexCoord;
- vec4 inPos = vec4(a_Position.xyz, 1.0);
- gl_Position = worldMatrix * inPos;
- }
- // ------------------ BasicPixelShader ------------------
- #version 100
- precision mediump float;
- varying vec4 v_Color;
- varying vec2 v_TexCoord;
- uniform sampler2D u_Texture;
- void main()
- {
- vec4 sampledColor = texture2D(u_Texture, v_TexCoord);
- gl_FragColor = sampledColor;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement