2012-10-07 23:41:18 -04:00
|
|
|
|
#ifdef GL_ES
|
|
|
|
|
precision highp float;
|
|
|
|
|
#endif // GL_ES
|
|
|
|
|
|
|
|
|
|
uniform float u_time;
|
|
|
|
|
uniform mat4 u_modelViewProj;
|
|
|
|
|
uniform mat4 u_modelView;
|
|
|
|
|
varying vec4 v_color0;
|
|
|
|
|
varying vec3 v_normal;
|
|
|
|
|
varying vec3 v_view;
|
|
|
|
|
varying vec3 v_pos;
|
|
|
|
|
attribute vec3 a_normal;
|
|
|
|
|
attribute vec3 a_position;
|
|
|
|
|
void main ()
|
|
|
|
|
{
|
|
|
|
|
float tmpvar_1;
|
|
|
|
|
tmpvar_1 = ((sin(((a_position.x * 32.0) + (u_time * 4.0))) * 0.5) + 0.5);
|
|
|
|
|
float tmpvar_2;
|
|
|
|
|
tmpvar_2 = ((cos(((a_position.y * 32.0) + (u_time * 4.0))) * 0.5) + 0.5);
|
|
|
|
|
vec3 tmpvar_3;
|
|
|
|
|
tmpvar_3.x = tmpvar_1;
|
|
|
|
|
tmpvar_3.y = tmpvar_2;
|
|
|
|
|
tmpvar_3.z = (tmpvar_1 * tmpvar_2);
|
|
|
|
|
vec3 tmpvar_4;
|
2012-10-28 00:34:41 -04:00
|
|
|
|
tmpvar_4 = ((a_normal * 2.0) - 1.0);
|
|
|
|
|
vec3 tmpvar_5;
|
|
|
|
|
tmpvar_5 = (a_position + ((tmpvar_4 * tmpvar_3) * vec3(0.06, 0.06, 0.06)));
|
2012-10-07 23:41:18 -04:00
|
|
|
|
vec4 tmpvar_6;
|
2012-10-28 00:34:41 -04:00
|
|
|
|
tmpvar_6.w = 1.0;
|
|
|
|
|
tmpvar_6.xyz = tmpvar_5;
|
2012-10-07 23:41:18 -04:00
|
|
|
|
vec4 tmpvar_7;
|
2012-10-28 00:34:41 -04:00
|
|
|
|
tmpvar_7 = (u_modelViewProj * tmpvar_6);
|
|
|
|
|
gl_Position = tmpvar_7;
|
|
|
|
|
v_pos = tmpvar_7.xyz;
|
2012-10-07 23:41:18 -04:00
|
|
|
|
vec4 tmpvar_8;
|
2012-10-28 00:34:41 -04:00
|
|
|
|
tmpvar_8.w = 1.0;
|
|
|
|
|
tmpvar_8.xyz = tmpvar_5;
|
|
|
|
|
v_view = (u_modelView * tmpvar_8).xyz;
|
|
|
|
|
vec4 tmpvar_9;
|
|
|
|
|
tmpvar_9.w = 0.0;
|
|
|
|
|
tmpvar_9.xyz = tmpvar_4;
|
|
|
|
|
v_normal = (u_modelView * tmpvar_9).xyz;
|
|
|
|
|
float tmpvar_10;
|
|
|
|
|
tmpvar_10 = ((sqrt(dot (tmpvar_3, tmpvar_3)) * 0.4) + 0.6);
|
|
|
|
|
vec4 tmpvar_11;
|
|
|
|
|
tmpvar_11.w = 1.0;
|
|
|
|
|
tmpvar_11.x = tmpvar_10;
|
|
|
|
|
tmpvar_11.y = tmpvar_10;
|
|
|
|
|
tmpvar_11.z = tmpvar_10;
|
|
|
|
|
v_color0 = tmpvar_11;
|
2012-10-07 23:41:18 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|