Name | Type | Description |
---|---|---|
width |
number |
Width of the frame buffer |
height |
number |
Height of the frame buffer |
Members
colorTexture PIXI.BaseTexture readonly
Reference to the colorTexture.
Height of framebuffer in pixels.
multisample PIXI.MSAA_QUALITY
Desired number of samples for antialiasing. 0 means AA should not be used.
Experimental WebGL2 feature, allows to use antialiasing in individual renderTextures.
Antialiasing is the same as for main buffer with renderer antialias: true
options.
Seriously affects GPU memory consumption and GPU performance.
- Default Value:
- PIXI.MSAA_QUALITY.NONE
Example
import { MSAA_QUALITY } from 'pixi.js';
renderTexture.framebuffer.multisample = MSAA_QUALITY.HIGH;
// ...
renderer.render(myContainer, { renderTexture });
renderer.framebuffer.blit(); // Copies data from MSAA framebuffer to texture
Width of framebuffer in pixels.
Methods
Add texture to the colorTexture array.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
index |
number | 0 |
Index of the array to add the texture to |
|
texture |
PIXI.BaseTexture |
<optional> |
Texture to add to the array |
Returns:
Type | Description |
---|---|
this |
Add a depth texture to the frame buffer.
Name | Type | Attributes | Description |
---|---|---|---|
texture |
PIXI.BaseTexture |
<optional> |
Texture to add. |
Returns:
Type | Description |
---|---|
this |
Destroys and removes the depth texture added to this framebuffer.
Disposes WebGL resources that are connected to this geometry.
Enable depth on the frame buffer.
Returns:
Type | Description |
---|---|
this |
Enable stencil on the frame buffer.
Returns:
Type | Description |
---|---|
this |
Resize the frame buffer
Name | Type | Description |
---|---|---|
width |
number |
Width of the frame buffer to resize to |
height |
number |
Height of the frame buffer to resize to |