mirror of
https://github.com/seigler/generative
synced 2025-07-27 07:06:08 +00:00
18 lines
453 B
GLSL
18 lines
453 B
GLSL
// our vertex data
|
|
attribute vec3 aPosition;
|
|
attribute vec2 aTexCoord;
|
|
|
|
// lets get texcoords just for fun!
|
|
varying vec2 vTexCoord;
|
|
|
|
void main() {
|
|
// copy the texcoords
|
|
vTexCoord = aTexCoord;
|
|
|
|
// copy the position data into a vec4, using 1.0 as the w component
|
|
vec4 positionVec4 = vec4(aPosition, 1.0);
|
|
positionVec4.xy = positionVec4.xy * 2.0 - 1.0;
|
|
|
|
// send the vertex information on to the fragment shader
|
|
gl_Position = positionVec4;
|
|
}
|