Update RenderTextureWebGLRenderer.js

This commit is contained in:
Richard Davey 2020-11-19 16:40:35 +00:00
parent 7562683cfb
commit 91924be2ee

View file

@ -22,9 +22,6 @@ var Utils = require('../../renderer/webgl/Utils');
*/
var RenderTextureWebGLRenderer = function (renderer, src, camera, parentMatrix)
{
var frameWidth = src.frame.width;
var frameHeight = src.frame.height;
var cameraAlpha = camera.alpha;
var renderTarget = src.renderTarget;
@ -37,9 +34,6 @@ var RenderTextureWebGLRenderer = function (renderer, src, camera, parentMatrix)
var textureUnit = pipeline.setTexture2D(renderTarget.texture);
var u = 0;
var v = 1 - (frameHeight / height);
src.pipeline.batchTexture(
src,
renderTarget.texture,
@ -57,12 +51,11 @@ var RenderTextureWebGLRenderer = function (renderer, src, camera, parentMatrix)
getTint(src.tintBottomLeft, cameraAlpha * src._alphaBL),
getTint(src.tintBottomRight, cameraAlpha * src._alphaBR),
src.tintFill,
u, v,
0, 0,
camera,
parentMatrix,
true,
textureUnit,
frameWidth, frameHeight
textureUnit
);
renderer.resetTextures();