This commit is contained in:
Andrea Bogazzi 2017-06-23 21:12:57 +02:00 committed by GitHub
parent f99b0d78f3
commit efc2a216c7
2 changed files with 3 additions and 2 deletions

View file

@ -276,6 +276,7 @@
*/
toObject: function() {
return {
type: this.type,
color: this.color,
mode: this.mode,
alpha: this.alpha

View file

@ -36,7 +36,7 @@
*/
fragmentSource: 'precision highp float;\n' +
'uniform sampler2D uTexture;\n' +
'uniform float uHeight;\n' +
'uniform float uStepH;\n' +
'uniform float uNoise;\n' +
'uniform float uSeed;\n' +
'varying vec2 vTexCoord;\n' +
@ -45,7 +45,7 @@
'}\n' +
'void main() {\n' +
'vec4 color = texture2D(uTexture, vTexCoord);\n' +
'color.rgb += (0.5 - rand(vTexCoord, uSeed, uHeight / 10.0)) * uNoise;\n' +
'color.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise;\n' +
'gl_FragColor = color;\n' +
'}',