blob: 8f746ad29fff84e2b39f8f16af6c25c82ff5e9f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#version 330 core
in vec3 position;
in vec2 texcoord_vert;
out vec2 texcoord_frag;
uniform float time;
uniform mat4 proj;
uniform mat4 view;
uniform mat4 model;
uniform sampler2D tex;
void main() {
texcoord_frag = texcoord_vert;
vec3 pos = position;
//pos.z = sin(pos.x + time) * cos(pos.y + time);
pos.z = texture2D(tex, pos.xy).r * 0.05;
gl_Position = proj * view * model * vec4(pos, 1.0);
}
|