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

Commit29885f4

Browse files
committed
Improve compilation of fullscreen materials
1 parent5292a36 commit29885f4

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

‎src/core/Pass.ts‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
Camera,
66
Event,
77
EventDispatcher,
8+
Group,
89
Material,
910
Mesh,
1011
Object3D,
@@ -854,22 +855,17 @@ export abstract class Pass<TMaterial extends Material | null = null>
854855

855856
}
856857

857-
constcurrentMaterial=this.fullscreenMaterial;
858+
constgroup=newGroup();
858859

859860
for(constmaterialofthis.materials){
860861

861-
this.fullscreenMaterial=material;
862-
awaitthis.renderer.compileAsync(this.fullscreenScene!,this.fullscreenCamera!);
862+
group.add(newMesh(Pass.fullscreenGeometry,material!));
863863

864864
}
865865

866-
if(currentMaterial!==undefined){
867-
868-
this.fullscreenMaterial=currentMaterial;
869-
870-
}
871-
872-
constpromises:Promise<Object3D|void>[]=[];
866+
constpromises:Promise<Object3D|void>[]=[
867+
this.renderer.compileAsync(group,this.fullscreenCamera!,this.fullscreenScene)
868+
];
873869

874870
for(constpassofthis.subpasses){
875871

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp