Commit 73941294 authored by pcy's avatar pcy
Browse files

make the testcode less ugly

parent 2b5850e5
...@@ -115,7 +115,7 @@ class TestGame : Game { ...@@ -115,7 +115,7 @@ class TestGame : Game {
"\n"+ "\n"+
"vec4 plas(float time, vec2 v) {\n"+ "vec4 plas(float time, vec2 v) {\n"+
" float c = 0.5 + sin(v.x * 10.0) + cos(sin(time + v.y) * 20.0);\n"+ " float c = 0.5 + sin(v.x * 10.0) + cos(sin(time + v.y) * 20.0);\n"+
" return vec4(sin(c * 0.2 + cos(time)), c * 0.15, cos(c * 0.1 + time / .4) * .25, 1.0);\n"+ " return vec4(sin(c * 0.2 + cos(time)), c * 0.15, cos(c * 0.1 + time / .4) * .25, 1.0)*texture2D(mytex, v);\n"+
"}\n"+ "}\n"+
"\n"+ "\n"+
"void main() {\n"+ "void main() {\n"+
...@@ -126,7 +126,6 @@ class TestGame : Game { ...@@ -126,7 +126,6 @@ class TestGame : Game {
" vec2 uv = vec2(gl_FragCoord.x/v2Resolution.x, gl_FragCoord.y/v2Resolution.y);\n"+ " vec2 uv = vec2(gl_FragCoord.x/v2Resolution.x, gl_FragCoord.y/v2Resolution.y);\n"+
" uv -= 0.5;\n"+ " uv -= 0.5;\n"+
" uv /= vec2(v2Resolution.y/v2Resolution.x, 1.);\n"+ " uv /= vec2(v2Resolution.y/v2Resolution.x, 1.);\n"+
" vec2 ouv = uv;\n"+
"\n"+ "\n"+
" vec2 m;\n"+ " vec2 m;\n"+
" m.x = atan(uv.x / uv.y) / pi;\n"+ " m.x = atan(uv.x / uv.y) / pi;\n"+
...@@ -136,7 +135,7 @@ class TestGame : Game { ...@@ -136,7 +135,7 @@ class TestGame : Game {
" m.y += fGlobalTime * 0.25;\n"+ " m.y += fGlobalTime * 0.25;\n"+
"\n"+ "\n"+
" vec4 t = plas(fGlobalTime, m * pi) / d;\n"+ " vec4 t = plas(fGlobalTime, m * pi) / d;\n"+
" C = clamp(t, 0.0, 1.0)*texture2D(mytex, ouv);\n"+ " C = clamp(t, 0.0, 1.0);\n"+
" /*gl_FragColor = vec4(0);*/\n"+ " /*gl_FragColor = vec4(0);*/\n"+
"}\n"} "}\n"}
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment