mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 13:25:28 +00:00
29 lines
887 B
C
29 lines
887 B
C
static const char *stock_vertex_xmb =
|
|
"attribute vec3 vPosition;\n"
|
|
"uniform float time;\n"
|
|
"varying vec3 v;\n"
|
|
"float iqhash( float n )\n"
|
|
"{\n"
|
|
" return fract(sin(n)*43758.5453);\n"
|
|
"}\n"
|
|
"float noise( vec3 x )\n"
|
|
"{\n"
|
|
" vec3 p = floor(x);\n"
|
|
" vec3 f = fract(x);\n"
|
|
" f = f*f*(3.0-2.0*f);\n"
|
|
" float n = p.x + p.y*57.0 + 113.0*p.z;\n"
|
|
" return mix(mix(mix( iqhash(n+0.0 ), iqhash(n+1.0 ),f.x),\n"
|
|
" mix( iqhash(n+57.0 ), iqhash(n+58.0 ),f.x),f.y),\n"
|
|
" mix(mix( iqhash(n+113.0), iqhash(n+114.0),f.x),\n"
|
|
" mix( iqhash(n+170.0), iqhash(n+171.0),f.x),f.y),f.z);\n"
|
|
"}\n"
|
|
"void main()\n"
|
|
"{\n"
|
|
" v = vPosition;\n"
|
|
" vec3 v2 = v;\n"
|
|
" v2.x = v2.x + time/2.0;\n"
|
|
" v2.z = v.z * 3.0;\n"
|
|
" v.y = -cos((v.x+v.z/3.0+time)*2.0)/10.0 - noise(v2.xyz)/4.0;\n"
|
|
" gl_Position = vec4(v, 1.0);\n"
|
|
"}\n";
|