shadowBias
Apply a shadow bias to prevent self-shadowing artifacts. The specified value is the proportion of the trail width at each segment.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public float shadowBias { get; set; }
Examples
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; }}