# shadowBias

> Apply a shadow bias to prevent self-shadowing artifacts. The specified value is the proportion of the trail width at each segment.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public float shadowBias { get; set; }
```

### Examples

```csharp
using UnityEngine;
using System.Collections;

[RequireComponent(typeof(TrailRenderer))]
public class ExampleClass : MonoBehaviour
{
    private TrailRenderer tr;

    void Start()
    {
        tr = GetComponent<TrailRenderer>();
        tr.material = new Material(Shader.Find("Standard"));
        tr.castShadows = true;
        tr.receiveShadows = true;
        tr.shadowBias = 0.3f;
    }
}
```
