@@ -78,8 +78,8 @@ Phaser.Renderer.WebGL.Batch.Pixel.prototype.init = function ()
7878 'varying vec4 vColor;' , // the color value passed in from the vertex shader
7979
8080 'void main(void) {' ,
81- // ' gl_FragColor = vColor;',
82- ' gl_FragColor = PINK;' ,
81+ ' gl_FragColor = vColor;' ,
82+ // ' gl_FragColor = PINK;',
8383 '}'
8484 ] ;
8585
@@ -197,40 +197,32 @@ Phaser.Renderer.WebGL.Batch.Pixel.prototype.bindShader = function ()
197197 gl . vertexAttribPointer ( this . aColor , 4 , gl . UNSIGNED_BYTE , true , vertSize , 8 ) ;
198198} ;
199199
200- Phaser . Renderer . WebGL . Batch . Pixel . prototype . add = function ( verts , color )
200+ Phaser . Renderer . WebGL . Batch . Pixel . prototype . add = function ( x0 , y0 , x1 , y1 , x2 , y2 , x3 , y3 , color )
201201{
202202 // These are TypedArray Views into the vertices ArrayBuffer
203203 var colors = this . colors ;
204204 var positions = this . positions ;
205205
206206 var i = this . _i ;
207207
208- // Top Left vert (xy, uv, color)
209- positions [ i ++ ] = verts . x0 ;
210- positions [ i ++ ] = verts . y0 ;
211- // positions[i++] = uvs.x0;
212- // positions[i++] = uvs.y0;
208+ // Top Left vert (xy, color)
209+ positions [ i ++ ] = x0 ;
210+ positions [ i ++ ] = y0 ;
213211 colors [ i ++ ] = color ;
214212
215- // Top Right vert (xy, uv, color)
216- positions [ i ++ ] = verts . x1 ;
217- positions [ i ++ ] = verts . y1 ;
218- // positions[i++] = uvs.x1;
219- // positions[i++] = uvs.y1;
213+ // Top Right vert (xy, color)
214+ positions [ i ++ ] = x1 ;
215+ positions [ i ++ ] = y1 ;
220216 colors [ i ++ ] = color ;
221217
222- // Bottom Right vert (xy, uv, color)
223- positions [ i ++ ] = verts . x2 ;
224- positions [ i ++ ] = verts . y2 ;
225- // positions[i++] = uvs.x2;
226- // positions[i++] = uvs.y2;
218+ // Bottom Right vert (xy, color)
219+ positions [ i ++ ] = x2 ;
220+ positions [ i ++ ] = y2 ;
227221 colors [ i ++ ] = color ;
228222
229- // Bottom Left vert (xy, uv, color)
230- positions [ i ++ ] = verts . x3 ;
231- positions [ i ++ ] = verts . y3 ;
232- // positions[i++] = uvs.x3;
233- // positions[i++] = uvs.y3;
223+ // Bottom Left vert (xy, color)
224+ positions [ i ++ ] = x3 ;
225+ positions [ i ++ ] = y3 ;
234226 colors [ i ++ ] = color ;
235227
236228 this . _i = i ;
0 commit comments