RetroArch
modern_pipeline_xmb_ribbon_simple.glsl.vert.h
Go to the documentation of this file.
1 #include "shaders_common.h"
2 
3 static const char *stock_vertex_xmb_simple_modern = GLSL(
4  in vec3 VertexCoord;
5  uniform float time;
6 
7  float iqhash( float n )
8  {
9  return fract(sin(n)*43758.5453);
10  }
11 
12  float noise( vec3 x )
13  {
14  vec3 p = floor(x);
15  vec3 f = fract(x);
16  f = f*f*(3.0-2.0*f);
17  float n = p.x + p.y*57.0 + 113.0*p.z;
18  return mix(mix(mix( iqhash(n+0.0 ), iqhash(n+1.0 ),f.x),
19  mix( iqhash(n+57.0 ), iqhash(n+58.0 ),f.x),f.y),
20  mix(mix( iqhash(n+113.0), iqhash(n+114.0),f.x),
21  mix( iqhash(n+170.0), iqhash(n+171.0),f.x),f.y),f.z);
22  }
23 
24  void main()
25  {
26  vec3 v = vec3(VertexCoord.x, 0.0, VertexCoord.y);
27  vec3 v2 = v;
28  v2.x = v2.x + time/2.0;
29  v2.z = v.z * 3.0;
30  v.y = -cos((v.x+v.z/3.0+time)*2.0)/10.0 - noise(v2.xyz)/4.0;
31  gl_Position = vec4(v, 1.0);
32  }
33 );
GLfloat f
Definition: glext.h:8207
#define floor(x)
Definition: math.h:25
#define GLSL(src)
Definition: shaders_common.h:10
GLfloat GLfloat GLfloat v2
Definition: glext.h:6703
time_t time(time_t *timer)
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
GLuint in
Definition: glext.h:10523
GLfloat GLfloat p
Definition: glext.h:9809
#define sin(x)
Definition: math.h:23
int main(int argc, char *argv[])
Definition: send-presence.c:197
const GLdouble * v
Definition: glext.h:6391
#define cos(x)
Definition: math.h:21
static const char * stock_vertex_xmb_simple_modern
Definition: modern_pipeline_xmb_ribbon_simple.glsl.vert.h:3
#define gl_Position
Definition: internal_interface.hpp:385
GLdouble n
Definition: glext.h:8396