This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @filter Vignette | |
* @description Adds a simulated lens edge darkening effect. | |
* | |
* param size 0 to 1 (0 for center of frame, 1 for edge of frame) | |
* param amount 0 to 1 (0 for no effect, 1 for maximum lens darkening) | |
* | |
* Original shader by Evan Wallace. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Phaser.Filter.ZoomBlur = function (game) { | |
Phaser.Filter.call(this, game); | |
this.uniforms.center = {type: '2f', value:{x:0, y:0}}; | |
this.uniforms.strength = {type: '1f', value:0.1}; | |
this.uniforms.innerRadius = {type: '1f', value:0}; | |
this.uniforms.radius = {type: '1f', value:1}; | |
//this.uniforms.blur = {type: '1f', value:1}; | |
//this.uniforms.filterArea = {type: '4f', value:{x:0, y:0, width:1280,height:720}}; |