@@ -186,21 +186,12 @@ var Shader = new Class({
186186 */
187187 this . _tempMatrix3 = new TransformMatrix ( ) ;
188188
189- /**
190- * A temporary Transform Matrix, re-used internally during batching.
191- *
192- * @name Phaser.Renderer.WebGL.Pipelines.QuadShaderPipeline#_tempMatrix4
193- * @private
194- * @type {Phaser.GameObjects.Components.TransformMatrix }
195- * @since 3.17.0
196- */
197- this . _tempMatrix4 = new TransformMatrix ( ) ;
198-
199189 this . setPosition ( x , y ) ;
200190 this . setSize ( width , height ) ;
201191 this . setOrigin ( 0.5 , 0.5 ) ;
202192
203193 this . mvpInit ( ) ;
194+
204195 this . projOrtho ( 0 , this . renderer . width , this . renderer . height , 0 , - 1000.0 , 1000.0 ) ;
205196 } ,
206197
@@ -292,60 +283,31 @@ var Shader = new Class({
292283 gl . drawArrays ( topology , 0 , vertexCount ) ;
293284 } ,
294285
295-
296-
297286 /**
298287 * Renders a single quad using the current shader and then flushes the batch.
299288 *
300289 * @method Phaser.Renderer.WebGL.Pipelines.QuadShaderPipeline#draw
301290 * @since 3.17.0
302- *
303- * @param {number } x - Horizontal top left coordinate of the rectangle.
304- * @param {number } y - Vertical top left coordinate of the rectangle.
305- * @param {number } width - Width of the rectangle.
306- * @param {number } height - Height of the rectangle.
307- * @param {Phaser.GameObjects.Components.TransformMatrix } currentMatrix - The current transform.
308- * @param {Phaser.GameObjects.Components.TransformMatrix } parentMatrix - The parent transform.
309291 */
310- draw : function ( x , y , width , height , currentMatrix , parentMatrix )
292+ draw : function ( )
311293 {
312- var calcMatrix = this . _tempMatrix3 ;
313-
314- // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix
315- if ( parentMatrix )
316- {
317- parentMatrix . multiply ( currentMatrix , calcMatrix ) ;
318- }
319-
320- var xw = x + width ;
321- var yh = y + height ;
322-
323- var x0 = calcMatrix . getX ( x , y ) ;
324- var y0 = calcMatrix . getY ( x , y ) ;
325-
326- var x1 = calcMatrix . getX ( x , yh ) ;
327- var y1 = calcMatrix . getY ( x , yh ) ;
328-
329- var x2 = calcMatrix . getX ( xw , yh ) ;
330- var y2 = calcMatrix . getY ( xw , yh ) ;
331-
332- var x3 = calcMatrix . getX ( xw , y ) ;
333- var y3 = calcMatrix . getY ( xw , y ) ;
294+ var xw = this . width ;
295+ var yh = this . height ;
334296
335297 var vertexViewF32 = this . vertexViewF32 ;
336298
337- vertexViewF32 [ 0 ] = x0 ;
338- vertexViewF32 [ 1 ] = y0 ;
339- vertexViewF32 [ 2 ] = x1 ;
340- vertexViewF32 [ 3 ] = y1 ;
341- vertexViewF32 [ 4 ] = x2 ;
342- vertexViewF32 [ 5 ] = y2 ;
343- vertexViewF32 [ 6 ] = x0 ;
344- vertexViewF32 [ 7 ] = y0 ;
345- vertexViewF32 [ 8 ] = x2 ;
346- vertexViewF32 [ 9 ] = y2 ;
347- vertexViewF32 [ 10 ] = x3 ;
348- vertexViewF32 [ 11 ] = y3 ;
299+ vertexViewF32 [ 0 ] = 0 ;
300+ vertexViewF32 [ 1 ] = 0 ;
301+ vertexViewF32 [ 2 ] = 0 ;
302+ vertexViewF32 [ 3 ] = yh ;
303+ vertexViewF32 [ 4 ] = xw ;
304+ vertexViewF32 [ 5 ] = yh ;
305+ vertexViewF32 [ 6 ] = 0 ;
306+ vertexViewF32 [ 7 ] = 0 ;
307+ vertexViewF32 [ 8 ] = xw ;
308+ vertexViewF32 [ 9 ] = yh ;
309+ vertexViewF32 [ 10 ] = xw ;
310+ vertexViewF32 [ 11 ] = 0 ;
349311
350312 this . flush ( ) ;
351313 } ,
0 commit comments