You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
442 B
19 lines
442 B
attribute vec4 position;
|
|
attribute vec4 color;
|
|
|
|
varying lowp vec4 colorVarying;
|
|
|
|
uniform mat4 modelViewProjectionMatrix;
|
|
uniform mat3 normalMatrix;
|
|
uniform float time;
|
|
|
|
void main( void ) {
|
|
gl_Position = modelViewProjectionMatrix * position;
|
|
|
|
if(sin(time / 8.0) < 0.0)
|
|
gl_Position.y -= gl_Position.x*gl_Position.x*gl_Position.z*sin(time)*0.02;
|
|
else
|
|
gl_Position.y -= gl_Position.x*gl_Position.z*sin(time)*0.05;
|
|
|
|
colorVarying = color;
|
|
}
|
|
|