Swizzle RGB

This commit is contained in:
Richard Davey 2020-11-16 15:45:45 +00:00
parent 52acf60125
commit c12b4cff3f
3 changed files with 7 additions and 9 deletions

View file

@ -315,12 +315,12 @@ var Fade = new Class({
var camera = this.camera;
var red = this.red / 255;
var blue = this.blue / 255;
var green = this.green / 255;
var blue = this.blue / 255;
pipeline.drawFillRect(
camera.x, camera.y, camera.width, camera.height,
getTintFunction(red, green, blue, 1),
getTintFunction(blue, green, red, 1),
this.alpha
);

View file

@ -283,12 +283,12 @@ var Flash = new Class({
var camera = this.camera;
var red = this.red / 255;
var blue = this.blue / 255;
var green = this.green / 255;
var blue = this.blue / 255;
pipeline.drawFillRect(
camera.x, camera.y, camera.width, camera.height,
getTintFunction(red, green, blue, 1),
getTintFunction(blue, green, red, 1),
this.alpha
);

View file

@ -2143,11 +2143,11 @@ var WebGLRenderer = new Class({
if (color.alphaGL > 0)
{
var pipeline = this.pipelines.setCameraPipeline();
var pipeline = this.pipelines.setMulti();
pipeline.drawFillRect(
cx, cy, cw, ch,
Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1),
Utils.getTintFromFloats(color.blueGL, color.greenGL, color.redGL, 1),
color.alphaGL
);
}
@ -2197,7 +2197,7 @@ var WebGLRenderer = new Class({
{
if (camera.flashEffect.isRunning || camera.fadeEffect.isRunning)
{
var pipeline = this.pipelines.setCameraPipeline();
var pipeline = this.pipelines.setMulti();
camera.flashEffect.postRenderWebGL(pipeline, Utils.getTintFromFloats);
camera.fadeEffect.postRenderWebGL(pipeline, Utils.getTintFromFloats);
@ -2219,8 +2219,6 @@ var WebGLRenderer = new Class({
camera.emit(CameraEvents.POST_RENDER, camera);
this.pipelines.postBatchCamera(camera);
this.resetTextures();
}
},