Skip to content

Commit 59739a3

Browse files
mrdoobAntigravity
andauthored
WebGLOutput: Handle antialias. (#33446)
Co-authored-by: Antigravity <noreply@google.com>
1 parent 1d9c50e commit 59739a3

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

-1.06 KB
Loading

src/renderers/WebGLRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ class WebGLRenderer {
544544

545545
if ( _outputBufferType !== UnsignedByteType ) {
546546

547-
output = new WebGLOutput( _outputBufferType, canvas.width, canvas.height, depth, stencil );
547+
output = new WebGLOutput( _outputBufferType, canvas.width, canvas.height, antialias, depth, stencil );
548548

549549
}
550550

src/renderers/webgl/WebGLOutput.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ const toneMappingMap = {
2929
[ CustomToneMapping ]: 'CUSTOM_TONE_MAPPING'
3030
};
3131

32-
function WebGLOutput( type, width, height, depth, stencil ) {
32+
function WebGLOutput( type, width, height, antialias, depth, stencil ) {
3333

3434
// render targets for scene and post-processing
3535
const targetA = new WebGLRenderTarget( width, height, {
3636
type: type,
3737
depthBuffer: depth,
3838
stencilBuffer: stencil,
39+
samples: antialias ? 4 : 0,
3940
depthTexture: depth ? new DepthTexture( width, height ) : undefined
4041
} );
4142

0 commit comments

Comments
 (0)