diff options
| author | yum <yum.food.vr@gmail.com> | 2026-01-13 14:59:28 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-01-13 14:59:42 -0800 |
| commit | b0982529d9e3d549106edd80a3e1246f3fb8cd2c (patch) | |
| tree | a08a6de43e58517016a5469e977c0d7dfc9e93b2 | |
| parent | 1f09fca8719cbc371083995a38ee7c094352ac11 (diff) | |
Impostors: add layer mask, skybox toggle
| -rw-r--r-- | Scripts/Impostors.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Scripts/Impostors.cs b/Scripts/Impostors.cs index 4ae47a3..92ea581 100644 --- a/Scripts/Impostors.cs +++ b/Scripts/Impostors.cs @@ -21,6 +21,12 @@ public class Impostors : MonoBehaviour [Tooltip("Near clipping distance - cameras are placed this distance outside the sphere")] public float nearClippingDistance = 0.01f; + [Tooltip("Layers to render when baking")] + public LayerMask cullingMask = -1; + + [Tooltip("Render skybox in baked images")] + public bool renderSkybox = false; + [HideInInspector] public GameObject[] cameraObjects; [HideInInspector] @@ -129,6 +135,12 @@ public class Impostors : MonoBehaviour cam.orthographicSize = sphere_radius_; cam.nearClipPlane = nearClippingDistance; cam.farClipPlane = sphere_radius_ * 2f + nearClippingDistance; + cam.cullingMask = cullingMask; + if (!renderSkybox) + { + cam.clearFlags = CameraClearFlags.SolidColor; + cam.backgroundColor = Color.clear; + } cam.enabled = false; // Only enable during baking cameraObjects[index] = camObj; |
