Merge pull request #11 from pyoor/master

Return via random.pick
This commit is contained in:
Christoph Diehl 2017-04-25 00:02:43 +03:00 committed by GitHub
commit f9b18617ba
1 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@
make.shaders = {
fragment1: function () {
return [
return random.pick([
[
"#ifdef GL_ES",
"precision mediump float;",
@ -23,10 +23,10 @@ make.shaders = {
"gl_FragColor = vec4(texelColor.rgb * vLighting, texelColor.a);",
"}"
]
]
]);
},
vertex1: function () {
return [
return random.pick([
[
"attribute vec4 aVertex;",
"attribute vec4 aColor;",
@ -56,10 +56,10 @@ make.shaders = {
"vLighting = ambientLight + (directionalLightColor * directional);",
"}"
]
]
]);
},
fragment2: function () {
return [
return random.pick([
[
"varying highp vec2 vTextureCoord;",
"varying highp vec3 vLighting;",
@ -88,10 +88,10 @@ make.shaders = {
"gl_FragData[2]=vec4(specularFactor,specularHardness*0.1,0.0,1.0);",
"}"
]
]
]);
},
vertex2: function () {
return [
return random.pick([
[
"attribute highp vec3 aVertexNormal;",
"attribute highp vec3 aVertexPosition;",
@ -134,7 +134,7 @@ make.shaders = {
"varyingUV = vertexUV;",
"}"
]
]
]);
},
shaderPair: function (v, f) {
let i = random.number(v.length);