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