Merge pull request #3445 from delftswa2018/3385-Rendertexture-alpha-not-changing-in-WEBGL-mode

Fix changing alpha in RenderTextureWebGLRenderer
This commit is contained in:
Richard Davey 2018-03-22 14:52:14 +00:00 committed by GitHub
commit 04b5985724
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@
*/
var GameObject = require('../GameObject');
var Utils = require('../../renderer/webgl/Utils');
/**
* Renders this Game Object with the Canvas Renderer to the given Camera.
@ -39,7 +40,7 @@ var RenderTextureWebGLRenderer = function (renderer, renderTexture, interpolatio
renderTexture.scrollFactorX, renderTexture.scrollFactorY,
renderTexture.displayOriginX, renderTexture.displayOriginY,
0, 0, renderTexture.texture.width, renderTexture.texture.height,
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
Utils.getTintAppendFloatAlpha(renderTexture.tintTopLeft, renderTexture.alphaTopLeft), Utils.getTintAppendFloatAlpha(renderTexture.tintTopRight, renderTexture.alphaTopRight), Utils.getTintAppendFloatAlpha(renderTexture.tintBottomLeft, renderTexture.alphaBottomLeft), Utils.getTintAppendFloatAlpha(renderTexture.tintBottomRight, renderTexture.alphaBottomRight),
0, 0,
camera
);