Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitadc2ace

Browse files
committed
Set transparent if canvas uses alpha
1 parentde7df0a commitadc2ace

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎src/passes/EffectPass.js‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,19 @@ export class EffectPass extends Pass {
381381

382382
}
383383

384+
/**
385+
* Indicates whether the renderer uses alpha.
386+
*
387+
*@private
388+
*@type {Boolean}
389+
*/
390+
391+
getalpha(){
392+
393+
returnthis.renderer!==null&&this.renderer.getContext().getContextAttributes().alpha;
394+
395+
}
396+
384397
/**
385398
* Sets the effects.
386399
*
@@ -571,6 +584,7 @@ export class EffectPass extends Pass {
571584
if(!this.skipRendering||this.renderToScreen){
572585

573586
constmaterial=this.fullscreenMaterial;
587+
material.transparent=this.renderToScreen&&this.alpha;
574588
material.inputBuffer=inputBuffer.texture;
575589
material.time+=deltaTime*this.timeScale;
576590

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp