Skip to content

Commit

Permalink
Use default parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
vanruesc committed Jan 4, 2025
1 parent e5046d8 commit bcb9cb9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/core/Pass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ export abstract class Pass<TMaterial extends Material | null = null>
* @param activeMipmapLevel - Specifies the active mipmap level.
*/

protected setRenderTarget(renderTarget: WebGLRenderTarget | WebGLRenderTarget<Texture[]> | null,
protected setRenderTarget(renderTarget: WebGLRenderTarget | WebGLRenderTarget<Texture[]> | null = null,
activeCubeFace?: number, activeMipmapLevel?: number): void {

this.renderer?.setRenderTarget(renderTarget, activeCubeFace, activeMipmapLevel);
Expand Down
2 changes: 1 addition & 1 deletion src/passes/BufferDebugPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class BufferDebugPass extends Pass<BufferDebugMaterial> {

override render(): void {

this.setRenderTarget(this.output.defaultBuffer?.value ?? null);
this.setRenderTarget(this.output.defaultBuffer?.value);
this.renderFullscreen();
this.renderer?.render(this.debugScene, this.debugCamera);

Expand Down
2 changes: 1 addition & 1 deletion src/passes/ClearPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class ClearPass extends Pass {
const background = this.scene?.background ?? null;
const hasOverrideClearColor = this.clearValues.color !== null;

this.setRenderTarget(this.output.defaultBuffer?.value ?? null);
this.setRenderTarget(this.output.defaultBuffer?.value);

if(!hasOverrideClearColor && this.camera !== null && background !== null) {

Expand Down
2 changes: 1 addition & 1 deletion src/passes/CopyPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class CopyPass extends Pass<CopyMaterial> {
if(!this.blit()) {

// Blit failed: use a shader to copy the input buffer.
this.setRenderTarget(this.output.defaultBuffer?.value ?? null);
this.setRenderTarget(this.output.defaultBuffer?.value);
this.renderFullscreen();

}
Expand Down
2 changes: 1 addition & 1 deletion src/passes/EffectPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class EffectPass extends Pass<EffectMaterial> {
const material = this.fullscreenMaterial;
material.time += this.timer.getDelta() * this.timeScale;

this.setRenderTarget(this.output.defaultBuffer?.value ?? null);
this.setRenderTarget(this.output.defaultBuffer?.value);
this.renderFullscreen();

}
Expand Down
2 changes: 1 addition & 1 deletion src/passes/GeometryPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ export class GeometryPass extends Pass implements Selective {

}

this.setRenderTarget(this.output.defaultBuffer?.value ?? null);
this.setRenderTarget(this.output.defaultBuffer?.value);
renderer.render(scene, camera);

// Restore the original values.
Expand Down
2 changes: 1 addition & 1 deletion src/passes/ShaderPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class ShaderPass<TMaterial extends ShaderMaterial = ShaderMaterial> exten

override render(): void {

this.setRenderTarget(this.output.defaultBuffer?.value ?? null);
this.setRenderTarget(this.output.defaultBuffer?.value);
this.renderFullscreen();

}
Expand Down

0 comments on commit bcb9cb9

Please sign in to comment.