- Vertex shader source code : attribute로 현재 vertex의정보와 각 vertex에서의 color및 texture의 uv vector정보가 있다. <br>또한, vertex들의 이동을 통해 object를 trasnformation 할 수 있는데, <br>이때 matrix의 곱의 형태로 사용되어진다. <br>texture의 uv vector는 varying으로 fragment에 전해진다. <br><br>
```
varying mediump vec2 texCoord;
uniform sampler2D sampler2d;
void main(void)
{
gl_FragColor = texture2D(sampler2d, texCoord);
gl_FragColor.a = 1.0 ;
}
```
- Fragment shader source code : vertex fragment로부터 varing을 통해 전달받은 texture의 uv vector를 통해<br> uniform 으로 선언된 texture를 mapping 할 수 있게 된다. <br>
- Vertex shader source code : attribute로 현재 vertex의정보와 각 vertex에서의 color및 texture의 uv vector정보가 있다. 또한, vertex들의 이동을 통해 object를 trasnformation 할 수 있는데, 이때 matrix의 곱의 형태로 사용되어진다. <br>texture의 uv vector는 varying으로 fragment에 전해진다. <br><br>