From 4cd6c6186c0a80947946a59cc18d2c30d7c54b5b Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Fri, 12 Jul 2024 15:57:45 +0300 Subject: [PATCH] bake shadows --- front/src/components/Promo/load_models.vue | 6 ++++-- front/src/components/Promo/main.vue | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/front/src/components/Promo/load_models.vue b/front/src/components/Promo/load_models.vue index a821ce3..8c2a36d 100644 --- a/front/src/components/Promo/load_models.vue +++ b/front/src/components/Promo/load_models.vue @@ -16,8 +16,10 @@ function shadows_and_pos(scene: any) { scene.children.forEach((el: any) => { el.receiveShadow = true el.castShadow = true - if(el.isPointLight) { + if (el.isPointLight) { el.shadow.bias = -0.01 + const k = 8 + el.shadow.mapSize = new Vector2(512 * k, 512 * k) } shadows_and_pos(el) }) @@ -209,7 +211,7 @@ watch(() => sidebar_scene.list, () => {