Skip to content

Commit

Permalink
Added Bakery light types
Browse files Browse the repository at this point in the history
  • Loading branch information
arranash committed Mar 2, 2024
1 parent 9693e67 commit 8a7fd63
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 0 deletions.
52 changes: 52 additions & 0 deletions EQS_Types/Bakery/Type_BakeryDirectLight.cs
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions EQS_Types/Bakery/Type_BakeryLightMesh.cs
Original file line number Diff line number Diff line change
@@ -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
58 changes: 58 additions & 0 deletions EQS_Types/Bakery/Type_BakeryPointLight.cs
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions EQS_Types/Bakery/Type_BakerySkyLight.cs
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8a7fd63

Please sign in to comment.