Skip to content

Commit c221bb7

Browse files
committed
Updated docs to clarify phaserjs#4091
1 parent dc1756b commit c221bb7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/gameobjects/rendertexture/RenderTexture.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ var UUID = require('../../utils/string/UUID');
2323
* A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and
2424
* draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic
2525
* textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads.
26+
*
27+
* Note that under WebGL a FrameBuffer, which is what the Render Texture uses internally, cannot be anti-aliased. This means
28+
* that when drawing objects such as Shapes to a Render Texture they will appear to be drawn with no aliasing, however this
29+
* is a technical limitation of WebGL. To get around it, create your shape as a texture in an art package, then draw that
30+
* to the Render Texture.
2631
*
2732
* @class RenderTexture
2833
* @extends Phaser.GameObjects.GameObject
@@ -424,7 +429,7 @@ var RenderTexture = new Class({
424429

425430
renderer.setFramebuffer(this.framebuffer, true);
426431

427-
renderer.pipelines.TextureTintPipeline.drawFillRect(
432+
this.pipeline.drawFillRect(
428433
bounds.x, bounds.y, bounds.right, bounds.bottom,
429434
Utils.getTintFromFloats(r / 255, g / 255, b / 255, 1),
430435
alpha
@@ -460,7 +465,7 @@ var RenderTexture = new Class({
460465
var renderer = this.renderer;
461466

462467
renderer.setFramebuffer(this.framebuffer, true);
463-
468+
464469
gl.clearColor(0, 0, 0, 0);
465470
gl.clear(gl.COLOR_BUFFER_BIT);
466471

0 commit comments

Comments
 (0)