Skip to content

Commit 42c810b

Browse files
committed
Fixed the resolution uniform type in the SampleFilter (thanks @VictoryRice phaserjs#1137)
1 parent d7f8950 commit 42c810b

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ Version 2.1.0 - "Cairhien" - -in development-
109109
* Fixed Group.removeBetweens default endIndex (thanks @darfux #1142)
110110
* Debug.cameraInfo no longer crashes if the camera bounds are nulled (thanks @wayfu #1143)
111111
* Camera.setBoundsToWorld no longer crashes if the camera bounds are nulled (thanks @wayfu #1143)
112+
* Fixed the resolution uniform type in the SampleFilter (thanks @VictoryRice #1137)
112113

113114
### p2.js 0.6.0 Changes and New Features
114115

filters/SampleFilter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Phaser.Filter.SampleFilter = function (game) {
99
* By default the following uniforms are already created and available:
1010
*
1111
* uniform float time - The current number of elapsed milliseconds in the game.
12-
* uniform vec3 resolution - The dimensions of the filter. Can be set via setSize(width, height)
12+
* uniform vec2 resolution - The dimensions of the filter. Can be set via setSize(width, height)
1313
* uniform vec4 mouse - The mouse / touch coordinates taken from the pointer given to the update function, if any.
1414
* uniform sampler2D uSampler - The current texture (usually the texture of the Sprite the shader is bound to)
1515
*
@@ -26,7 +26,7 @@ Phaser.Filter.SampleFilter = function (game) {
2626
this.fragmentSrc = [
2727

2828
"precision mediump float;",
29-
"uniform vec3 resolution;",
29+
"uniform vec2 resolution;",
3030
"uniform float time;",
3131
"uniform float divisor;",
3232

0 commit comments

Comments
 (0)