Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix noise filter and blend color filter. #4031

Merged
merged 1 commit into from
Jun 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/filters/blendcolor_filter.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
*/
toObject: function() {
return {
type: this.type,
color: this.color,
mode: this.mode,
alpha: this.alpha
Expand Down
4 changes: 2 additions & 2 deletions src/filters/noise_filter.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' +
Expand All @@ -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' +
'}',

Expand Down