# The shadow is displayed strangely

**URL:** https://discourse.threejs.org/t/the-shadow-is-displayed-strangely/21536
**Category:** Questions
**Tags:** shadows
**Created:** [December 12, 2020, 1:03pm UTC](https://discourse.threejs.org/t/the-shadow-is-displayed-strangely/21536 "2020-12-12T13:03:12Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Evil\_Google](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/evil_google/32/11834_2.png) [@Evil\_Google](https://discourse.threejs.org/u/Evil_Google)
#### Post date: [December 12, 2020, 1:03pm UTC](https://discourse.threejs.org/t/the-shadow-is-displayed-strangely/21536/1 "2020-12-12T13:03:13Z")

</div>

Hey. I created a platform and placed some cubes there.  
Cubes setup:  
cube.castShadow = true;

Site setup:  
world.receiveShadow = true;

Light source setting:  
var light = new THREE.PointLight(0xffffff, 1, 10, 2);  
light.power = 600;  
light.castShadow = shadow\_on;  
light.shadow.mapSize.width = 1024;  
light.shadow.mapSize.height = 1024;  
light.shadow.camera.near = 0.5;  
light.shadow.camera.far = 512;

Настройка рендера:  
renderer = new THREE.WebGLRenderer({antialias: true});  
renderer.shadowMap.enabled = true;  
renderer.shadowMap.type = THREE.PCFSoftShadowMap;

This problem appears 🙄

 ![dd](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/2/28de8355049f5598b0150ffa321fbea0bd029d67.jpeg)

---

<div class="post-metadata">

### Author: ![Evil\_Google](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/evil_google/32/11834_2.png) [@Evil\_Google](https://discourse.threejs.org/u/Evil_Google)
#### Post date: [January 13, 2021, 7:02am UTC](https://discourse.threejs.org/t/the-shadow-is-displayed-strangely/21536/2 "2021-01-13T07:02:25Z")

</div>

up the post

---

<div class="post-metadata">

### Author: ![gkjohnson](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gkjohnson/32/2298_2.png) [@gkjohnson](https://discourse.threejs.org/u/gkjohnson)
#### Post date: [January 13, 2021, 7:10am UTC](https://discourse.threejs.org/t/the-shadow-is-displayed-strangely/21536/3 "2021-01-13T07:10:00Z")

</div>

Look into setting `light.shadow.bias` and `light.shadow.normalBias`. `bias = -1e-4` and `normalBias = 1e2` is a reasonable starting place.

---

<div class="post-metadata">

### Author: ![tizkon](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tizkon](https://discourse.threejs.org/u/tizkon)
#### Post date: [January 13, 2021, 7:31am UTC](https://discourse.threejs.org/t/the-shadow-is-displayed-strangely/21536/4 "2021-01-13T07:31:28Z")

</div>

The same problem was solved at the end of this post:

> [@Shadow on itself GLTF model](https://discourse.threejs.org/t/shadow-on-itself-gltf-model/22272/3):
>
> I already have this settings added on this code: import \* as THREE from 'https://threejs.org/build/three.module.js'; import { GLTFLoader } from 'https://threejs.org/examples/jsm/loaders/GLTFLoader.js'; import {GUI} from 'https://threejsfundamentals.org/threejs/../3rdparty/dat.gui.module.js'; import { RGBELoader } from '../loaders/RGBELoader.js'; import { RoughnessMipmapper } from '../loaders/RoughnessMipmapper.js'; import { EffectComposer } from 'https://threejs.org/examples/jsm/postprocessing…

---

<div class="post-metadata">

### Author: ![Evil\_Google](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/evil_google/32/11834_2.png) [@Evil\_Google](https://discourse.threejs.org/u/Evil_Google)
#### Post date: [January 13, 2021, 8:04am UTC](https://discourse.threejs.org/t/the-shadow-is-displayed-strangely/21536/5 "2021-01-13T08:04:39Z")

</div>

[gkjohnson](https://discourse.threejs.org/u/gkjohnson) Thank you. Helped 😀

---

<div class="post-metadata">

### Author: ![Evil\_Google](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/evil_google/32/11834_2.png) [@Evil\_Google](https://discourse.threejs.org/u/Evil_Google)
#### Post date: [January 13, 2021, 10:18am UTC](https://discourse.threejs.org/t/the-shadow-is-displayed-strangely/21536/6 "2021-01-13T10:18:22Z")

</div>

**-1e-4** and **1e2**  
What are these symbols?

---

<div class="post-metadata">

### Author: ![tizkon](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tizkon](https://discourse.threejs.org/u/tizkon)
#### Post date: [January 13, 2021, 10:56am UTC](https://discourse.threejs.org/t/the-shadow-is-displayed-strangely/21536/7 "2021-01-13T10:56:36Z")

</div>

> <https://stackoverflow.com/questions/16209299/what-means-2e4-in-code/16209348#16209348>
