Skip to content

Commit 4bb0f24

Browse files
committed
chore(soba): clean up contact shadows
1 parent 75be7ec commit 4bb0f24

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libs/soba/staging/src/contact-shadows/contact-shadows.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ export class NgtsContactShadows {
161161
return [-width / 2, width / 2, height / 2, -height / 2, 0, this.far()];
162162
});
163163
contactShadows = computed(() => {
164-
const color = this.color();
165-
const resolution = this.resolution();
164+
const [color, resolution] = [this.color(), this.resolution()];
166165
const renderTarget = new THREE.WebGLRenderTarget(resolution, resolution);
167166
const renderTargetBlur = new THREE.WebGLRenderTarget(resolution, resolution);
168167
renderTargetBlur.texture.generateMipmaps = renderTarget.texture.generateMipmaps = false;
@@ -178,8 +177,7 @@ export class NgtsContactShadows {
178177
shader.fragmentShader = shader.fragmentShader.replace(
179178
`void main() {`, //
180179
`uniform vec3 ucolor;
181-
void main() {
182-
`,
180+
void main() {`,
183181
);
184182
shader.fragmentShader = shader.fragmentShader.replace(
185183
'vec4( vec3( 1.0 - fragCoordZ ), opacity );',

0 commit comments

Comments
 (0)