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

Commit4e69472

Browse files
committed
Add mode accessor
1 parent38a6f21 commit4e69472

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

‎src/passes/DepthCopyPass.ts‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { TextureResource } from "../core/io/TextureResource.js";
33
import{Pass}from"../core/Pass.js";
44
import{GBuffer}from"../enums/GBuffer.js";
55
import{DepthCopyMaterial}from"../materials/DepthCopyMaterial.js";
6+
import{DepthCopyMode}from"../enums/DepthCopyMode.js";
67

78
/**
89
* A pass that copies depth into a render target.
@@ -58,6 +59,32 @@ export class DepthCopyPass extends Pass<DepthCopyMaterial> {
5859

5960
}
6061

62+
/**
63+
* The current depth copy mode.
64+
*/
65+
66+
getmode():DepthCopyMode{
67+
68+
returnthis.fullscreenMaterial.mode;
69+
70+
}
71+
72+
setmode(value:DepthCopyMode){
73+
74+
this.fullscreenMaterial.mode=value;
75+
76+
if(value===DepthCopyMode.SINGLE){
77+
78+
this.resolution.setPreferredSize(1,1);
79+
80+
}else{
81+
82+
this.resolution.resetPreferredSize();
83+
84+
}
85+
86+
}
87+
6188
protectedoverrideonInputChange():void{
6289

6390
this.fullscreenMaterial.depthBuffer=this.input.getBuffer(GBuffer.DEPTH);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp