From 3d1ed918cee0b91ef26bd330b1fe5c6fe35cbfe3 Mon Sep 17 00:00:00 2001
From: Cameron Sun <cameron.sun@unity3d.com>
Date: Thu, 1 Jun 2023 14:25:21 -0700
Subject: [PATCH] Make sky color actually work in semantic segmentation

---
 .../SemanticSegmentation/SemanticSegmentationLabeler.cs         | 2 +-
 .../Runtime/GroundTruthTests/SegmentationGroundTruthTests.cs    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/com.unity.perception/Runtime/GroundTruth/Labelers/SemanticSegmentation/SemanticSegmentationLabeler.cs b/com.unity.perception/Runtime/GroundTruth/Labelers/SemanticSegmentation/SemanticSegmentationLabeler.cs
index 2270b7332..66735e469 100644
--- a/com.unity.perception/Runtime/GroundTruth/Labelers/SemanticSegmentation/SemanticSegmentationLabeler.cs
+++ b/com.unity.perception/Runtime/GroundTruth/Labelers/SemanticSegmentation/SemanticSegmentationLabeler.cs
@@ -181,7 +181,7 @@ NativeArray<Color32> GetSegmentationColorForEachLabeledObject()
         {
             var labeledObjectColors = new NativeArray<Color32>(
                 LabelManager.singleton.instanceIds.Length, Allocator.Persistent);
-            labeledObjectColors[0] = new Color32(0, 0, 0, 255);
+            labeledObjectColors[0] = labelConfig.skyColor;
 
             var i = 1;
             foreach (var labeledObject in LabelManager.singleton.registeredLabels)
diff --git a/com.unity.perception/Tests/Runtime/GroundTruthTests/SegmentationGroundTruthTests.cs b/com.unity.perception/Tests/Runtime/GroundTruthTests/SegmentationGroundTruthTests.cs
index 43cfadb53..fcb132834 100644
--- a/com.unity.perception/Tests/Runtime/GroundTruthTests/SegmentationGroundTruthTests.cs
+++ b/com.unity.perception/Tests/Runtime/GroundTruthTests/SegmentationGroundTruthTests.cs
@@ -58,7 +58,7 @@ public class SegmentationPassTests : GroundTruthTestBase
     {
         static readonly Color32 k_SemanticPixelValue = new Color32(10, 20, 30, Byte.MaxValue);
         static readonly Color32 k_InstanceSegmentationPixelValue = new Color32(255, 0, 0, 255);
-        static readonly Color32 k_SkyValue = new Color32(0, 0, 0, 255);
+        static readonly Color32 k_SkyValue = new Color32(1, 1, 1, 255);
 
         public enum SegmentationKind
         {