17 lines
341 B
GLSL
17 lines
341 B
GLSL
#version 110
|
|
|
|
attribute vec3 position;
|
|
attribute vec3 normal;
|
|
attribute vec2 uv;
|
|
varying vec2 uv_p;
|
|
|
|
uniform mat4 projectionMatrix;
|
|
uniform mat4 viewMatrix;
|
|
uniform mat4 modelMatrix;
|
|
|
|
void main(void) {
|
|
gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.0);
|
|
|
|
uv_p = vec2(clamp(uv.x + normal.x, 0.0, 1.0), uv.y);
|
|
}
|