Skip to content

Commit c972993

Browse files
committed
fix(soba/materials): update injectFBO usages
1 parent efb60cd commit c972993

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

libs/soba/materials/src/lib/mesh-portal-material.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export class ManagePortalScene {
5959
const quad = new FullScreenQuad(
6060
new THREE.ShaderMaterial({
6161
uniforms: {
62-
a: { value: buffer1().texture },
63-
b: { value: buffer2().texture },
62+
a: { value: buffer1.texture },
63+
b: { value: buffer2.texture },
6464
blend,
6565
},
6666
vertexShader: /*glsl*/ `
@@ -131,9 +131,9 @@ export class ManagePortalScene {
131131
// If blend is ongoing (> 0 and < 1) then we need to render both the root scene
132132
// and the portal scene, both will then be mixed in the quad from above
133133
blend.value = materialBlend;
134-
gl.setRenderTarget(buffer1());
134+
gl.setRenderTarget(buffer1);
135135
gl.render(scene, camera);
136-
gl.setRenderTarget(buffer2());
136+
gl.setRenderTarget(buffer2);
137137
gl.render(rootScene, camera);
138138
gl.setRenderTarget(null);
139139
quad.render(gl);

libs/soba/materials/src/lib/mesh-transmission-material.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class NgtsMeshTransmissionMaterial {
130130
private fboBack = injectFBO(() => ({ width: this.backResolution() }));
131131
private fboMain = injectFBO(() => ({ width: this.resolution() }));
132132

133-
protected bufferTexture = computed(() => this.buffer() || this.fboMain().texture);
133+
protected bufferTexture = computed(() => this.buffer() || this.fboMain.texture);
134134
protected anisotropicBlurOption = computed(() => this.anisotropicBlur() || this.anisotropy());
135135

136136
private discardMaterial = new MeshDiscardMaterial();
@@ -177,8 +177,8 @@ export class NgtsMeshTransmissionMaterial {
177177
thickness,
178178
side,
179179
] = [
180-
this.fboMain(),
181-
this.fboBack(),
180+
this.fboMain,
181+
this.fboBack,
182182
this.transmissionSampler(),
183183
this.background(),
184184
this.backside(),

0 commit comments

Comments
 (0)