From 8a7fd63044282a46c3e1c33c155c5c1d9bc92d3b Mon Sep 17 00:00:00 2001 From: Ashy <50887858+arranash@users.noreply.github.com> Date: Sat, 2 Mar 2024 15:24:35 +0000 Subject: [PATCH] Added Bakery light types --- EQS_Types/Bakery/Type_BakeryDirectLight.cs | 52 +++++++++++++++++++ EQS_Types/Bakery/Type_BakeryLightMesh.cs | 49 ++++++++++++++++++ EQS_Types/Bakery/Type_BakeryPointLight.cs | 58 ++++++++++++++++++++++ EQS_Types/Bakery/Type_BakerySkyLight.cs | 45 +++++++++++++++++ 4 files changed, 204 insertions(+) create mode 100644 EQS_Types/Bakery/Type_BakeryDirectLight.cs create mode 100644 EQS_Types/Bakery/Type_BakeryLightMesh.cs create mode 100644 EQS_Types/Bakery/Type_BakeryPointLight.cs create mode 100644 EQS_Types/Bakery/Type_BakerySkyLight.cs diff --git a/EQS_Types/Bakery/Type_BakeryDirectLight.cs b/EQS_Types/Bakery/Type_BakeryDirectLight.cs new file mode 100644 index 0000000..9b41aa4 --- /dev/null +++ b/EQS_Types/Bakery/Type_BakeryDirectLight.cs @@ -0,0 +1,52 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using EasyQuestSwitch.Fields; + +namespace EasyQuestSwitch.Types +{ + [AddComponentMenu("")] + public class Type_BakeryDirectLight : Type_Base + { + [System.NonSerialized] + private BakeryPointLight type; + + + public SharedColor color = new SharedColor(); + public SharedFloat intensity = new SharedFloat(); + public SharedFloat shadowSpread = new SharedFloat(); + public SharedInt shadowSamples = new SharedInt(); + public SharedFloat indirectIntensity = new SharedFloat(); + public SharedBool antiAlias = new SharedBool(); + + + public override void Setup(Object type) + { + + // base.Setup(type); + BakeryDirectLight component = (BakeryDirectLight)type; + color.Setup(component.color); + intensity.Setup(component.intensity); + shadowSpread.Setup(component.shadowSpread); + shadowSamples.Setup(component.samples); + indirectIntensity.Setup(component.indirectIntensity); + antiAlias.Setup(component.supersample); + + } + + public override void Process(Object type, BuildTarget buildTarget) + { + // base.Process(type, buildTarget); + BakeryDirectLight component = (BakeryDirectLight)type; + component.color = color.Get(buildTarget); + component.intensity = intensity.Get(buildTarget); + component.shadowSpread = shadowSpread.Get(buildTarget); + component.samples = shadowSamples.Get(buildTarget); + component.indirectIntensity = indirectIntensity.Get(buildTarget); + component.supersample = antiAlias.Get(buildTarget); + + + } + } +} +#endif diff --git a/EQS_Types/Bakery/Type_BakeryLightMesh.cs b/EQS_Types/Bakery/Type_BakeryLightMesh.cs new file mode 100644 index 0000000..367701e --- /dev/null +++ b/EQS_Types/Bakery/Type_BakeryLightMesh.cs @@ -0,0 +1,49 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using EasyQuestSwitch.Fields; + +namespace EasyQuestSwitch.Types +{ + [AddComponentMenu("")] + public class Type_BakeryLightMesh : Type_Base + { + [System.NonSerialized] + private BakeryLightMesh type; + + public SharedFloat intensity = new SharedFloat(); + public SharedColor color = new SharedColor(); + public SharedInt samplesNear = new SharedInt(); + public SharedInt samplesFar = new SharedInt(); + public SharedBool selfShadow = new SharedBool(); + public SharedFloat indirectIntensity = new SharedFloat(); + + public override void Setup(Object type) + { + + // base.Setup(type); + BakeryLightMesh component = (BakeryLightMesh)type; + intensity.Setup(component.intensity); + color.Setup(component.color); + samplesNear.Setup(component.samples); + samplesFar.Setup(component.samples2); + selfShadow.Setup(component.selfShadow); + indirectIntensity.Setup(component.indirectIntensity); + + } + + public override void Process(Object type, BuildTarget buildTarget) + { + // base.Process(type, buildTarget); + BakeryLightMesh component = (BakeryLightMesh)type; + component.intensity = intensity.Get(buildTarget); + component.color = color.Get(buildTarget); + component.samples = samplesNear.Get(buildTarget); + component.samples2 = samplesFar.Get(buildTarget); + component.selfShadow = selfShadow.Get(buildTarget); + component.indirectIntensity = indirectIntensity.Get(buildTarget); + + } + } +} +#endif diff --git a/EQS_Types/Bakery/Type_BakeryPointLight.cs b/EQS_Types/Bakery/Type_BakeryPointLight.cs new file mode 100644 index 0000000..eda62ee --- /dev/null +++ b/EQS_Types/Bakery/Type_BakeryPointLight.cs @@ -0,0 +1,58 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using EasyQuestSwitch.Fields; + +namespace EasyQuestSwitch.Types +{ + [AddComponentMenu("")] + public class Type_BakeryPointLight : Type_Base + { + [System.NonSerialized] + private BakeryPointLight type; + + + public SharedColor color = new SharedColor(); + public SharedFloat intensity = new SharedFloat(); + public SharedFloat shadowSpread = new SharedFloat(); + public SharedBool physicalFalloff = new SharedBool(); + public SharedFloat range = new SharedFloat(); + public SharedInt samples = new SharedInt(); + public SharedBool legacySampling = new SharedBool(); + public SharedFloat indirectIntensity = new SharedFloat(); + + + public override void Setup(Object type) + { + + // base.Setup(type); + BakeryPointLight component = (BakeryPointLight)type; + color.Setup(component.color); + intensity.Setup(component.intensity); + shadowSpread.Setup(component.shadowSpread); + physicalFalloff.Setup(component.realisticFalloff); + range.Setup(component.cutoff); + samples.Setup(component.samples); + legacySampling.Setup(component.legacySampling); + indirectIntensity.Setup(component.indirectIntensity); + + } + + public override void Process(Object type, BuildTarget buildTarget) + { + // base.Process(type, buildTarget); + BakeryPointLight component = (BakeryPointLight)type; + component.color = color.Get(buildTarget); + component.intensity = intensity.Get(buildTarget); + component.shadowSpread = shadowSpread.Get(buildTarget); + component.realisticFalloff = physicalFalloff.Get(buildTarget); + component.cutoff = range.Get(buildTarget); + component.samples = samples.Get(buildTarget); + component.legacySampling = legacySampling.Get(buildTarget); + component.indirectIntensity = indirectIntensity.Get(buildTarget); + + + } + } +} +#endif diff --git a/EQS_Types/Bakery/Type_BakerySkyLight.cs b/EQS_Types/Bakery/Type_BakerySkyLight.cs new file mode 100644 index 0000000..913e928 --- /dev/null +++ b/EQS_Types/Bakery/Type_BakerySkyLight.cs @@ -0,0 +1,45 @@ +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using EasyQuestSwitch.Fields; + +namespace EasyQuestSwitch.Types +{ + [AddComponentMenu("")] + public class Type_BakerySkyLight : Type_Base + { + [System.NonSerialized] + private BakerySkyLight type; + + + public SharedColor color = new SharedColor(); + public SharedFloat intensity = new SharedFloat(); + public SharedInt samples = new SharedInt(); + public SharedBool hemispherical = new SharedBool(); + + + public override void Setup(Object type) + { + + // base.Setup(type); + BakerySkyLight component = (BakerySkyLight)type; + color.Setup(component.color); + intensity.Setup(component.intensity); + samples.Setup(component.samples); + hemispherical.Setup(component.hemispherical); + + } + + public override void Process(Object type, BuildTarget buildTarget) + { + // base.Process(type, buildTarget); + BakerySkyLight component = (BakerySkyLight)type; + component.color = color.Get(buildTarget); + component.intensity = intensity.Get(buildTarget); + component.samples = samples.Get(buildTarget); + component.hemispherical = hemispherical.Get(buildTarget); + + } + } +} +#endif