Merge remote-tracking branch 'origin/feat/inport-props' into feat/craft-discovery
# Conflicts: # Assets/External/Animated PBR Chest Demo/Materials/WoodChest.mat # Packages/com.distantlands.cozy.core/Content/Integration/Import for BiRP.unitypackage.meta # Packages/com.distantlands.cozy.core/Content/Integration/Import for HDRP.unitypackage.meta # Packages/com.distantlands.cozy.core/Content/Integration/Import for URP.unitypackage.meta
This commit is contained in:
+1041
File diff suppressed because it is too large
Load Diff
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb4067eb14005684ea56a60547978721
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 259457
|
||||
packageName: 'Better Fog: Height Fog, Light Scattering & More'
|
||||
packageVersion: 3.1
|
||||
assetPath: Assets/INab Studio/Post Processing Assets/Better Fog/Core URP 6/Scripts/BetterFog.cs
|
||||
uploadId: 916910
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
using INab.BetterFog.Core;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
|
||||
namespace INab.BetterFog.URP
|
||||
{
|
||||
[VolumeComponentMenu("INab Studio/Better Fog")]
|
||||
[VolumeRequiresRendererFeatures(typeof(BetterFog))]
|
||||
[SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
|
||||
public sealed class BetterFogVolumeComponent : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class FogParameterURP : VolumeParameter<FogMode> { public FogParameterURP(FogMode value, bool overrideState = false) : base(value, overrideState) { } }
|
||||
|
||||
[Serializable]
|
||||
public sealed class HeightFogParameterURP : VolumeParameter<HeightFogType> { public HeightFogParameterURP(HeightFogType value, bool overrideState = false) : base(value, overrideState) { } }
|
||||
|
||||
[Serializable]
|
||||
public sealed class NoiseAffectParameterURP : VolumeParameter<NoiseAffect> { public NoiseAffectParameterURP(NoiseAffect value, bool overrideState = false) : base(value, overrideState) { } }
|
||||
|
||||
[Serializable]
|
||||
public class MyTextureParameter : TextureParameter
|
||||
{
|
||||
public MyTextureParameter(Texture value, bool overrideState = false)
|
||||
: this(value, TextureDimension.Any, overrideState) { }
|
||||
|
||||
public MyTextureParameter(Texture value, TextureDimension dimension, bool overrideState = false)
|
||||
: base(value, overrideState)
|
||||
{
|
||||
this.dimension = dimension;
|
||||
}
|
||||
|
||||
public float LerpValue;
|
||||
public Texture FromTexture;
|
||||
|
||||
public override void Interp(Texture from, Texture to, float t)
|
||||
{
|
||||
LerpValue = t;
|
||||
FromTexture = from;
|
||||
value = to;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public BetterFogVolumeComponent()
|
||||
{
|
||||
displayName = "Better Fog";
|
||||
}
|
||||
|
||||
#region FogParameters
|
||||
|
||||
public ClampedFloatParameter _FogIntensity = new ClampedFloatParameter(value: 1, min: 0, max: 1);
|
||||
public FloatParameter _EnergyLoss = new ClampedFloatParameter(value: 0, min: 0, max: 1);
|
||||
public BoolParameter _UseGradient = new BoolParameter(false);
|
||||
public ColorParameter _FogColor = new ColorParameter(new Color(.8f, .8f, .8f, 1f));
|
||||
public FloatParameter _GradientStart = new FloatParameter(0);
|
||||
public FloatParameter _GradientEnd = new FloatParameter(100);
|
||||
public MyTextureParameter _GradientTexture = new MyTextureParameter(null);
|
||||
|
||||
// Sun Light Parameters
|
||||
public BoolParameter _UseSunLight = new BoolParameter(false);
|
||||
public ColorParameter _SunColor = new ColorParameter(new Color(.9f, .85f, .8f, 1f));
|
||||
public ClampedFloatParameter _SunIntensity = new ClampedFloatParameter(value: 0, min: 0, max: 1);
|
||||
public ClampedFloatParameter _SunPower = new ClampedFloatParameter(value: 2, min: .1f, max: 12);
|
||||
|
||||
// Distance Fog Parameters
|
||||
public BoolParameter _UseDistanceFog = new BoolParameter(true);
|
||||
public BoolParameter _UseRadialDistance = new BoolParameter(false);
|
||||
public FogParameterURP _FogType = new FogParameterURP(FogMode.ExponentialSquared);
|
||||
public FloatParameter _DistanceFogOffset = new FloatParameter(-20);
|
||||
|
||||
// Scene Parameters
|
||||
public FloatParameter _SceneStart = new FloatParameter(10);
|
||||
public FloatParameter _SceneEnd = new FloatParameter(100);
|
||||
|
||||
// Fog Density
|
||||
public ClampedFloatParameter _FogDensity = new ClampedFloatParameter(value: 0, min: 0, max: .1f);
|
||||
|
||||
// Skybox Height Fog Parameters
|
||||
public BoolParameter _UseSkyboxHeightFog = new BoolParameter(false);
|
||||
public ClampedFloatParameter _SkyboxFogOffset = new ClampedFloatParameter(value: 0, min: -.1f, max: .1f);
|
||||
public ClampedFloatParameter _SkyboxFogHardness = new ClampedFloatParameter(value: .75f, min: 0, max: .999f);
|
||||
public ClampedFloatParameter _SkyboxFogIntensity = new ClampedFloatParameter(value: 1, min: 0, max: 1);
|
||||
public ClampedFloatParameter _SkyboxFill = new ClampedFloatParameter(value: 0, min: 0, max: 1);
|
||||
|
||||
// Height Fog Parameters
|
||||
public BoolParameter _UseHeightFog = new BoolParameter(false);
|
||||
public FloatParameter _Height = new FloatParameter(4);
|
||||
public ClampedFloatParameter _HeightDensity = new ClampedFloatParameter(value: 0, min: 0, max: .5f);
|
||||
public HeightFogParameterURP _HeightFogType = new HeightFogParameterURP(HeightFogType.ExponentialSquared);
|
||||
|
||||
// Noise Parameters
|
||||
public BoolParameter _UseNoise = new BoolParameter(false);
|
||||
public NoiseAffectParameterURP _NoiseAffect = new NoiseAffectParameterURP(NoiseAffect.Both);
|
||||
public ClampedFloatParameter _NoiseIntensity = new ClampedFloatParameter(value: 0, min: 0, max: 1);
|
||||
public FloatParameter _NoiseDistanceEnd = new FloatParameter(80);
|
||||
public ClampedFloatParameter _NoiseEndHardness = new ClampedFloatParameter(value: 0.35f, min: 1, max: 16);
|
||||
|
||||
// First Noise Layer
|
||||
public ClampedFloatParameter _Scale1 = new ClampedFloatParameter(value: 40, min: 5, max: 140);
|
||||
public ClampedFloatParameter _Lerp1 = new ClampedFloatParameter(value: .5f, min: 0, max: 1);
|
||||
public Vector3Parameter _NoiseSpeed1 = new Vector3Parameter(new Vector3(0, 0, 0));
|
||||
public ClampedFloatParameter _NoiseTimeScale1 = new ClampedFloatParameter(value: .1f, min: 0, max: .5f);
|
||||
|
||||
#endregion
|
||||
|
||||
#region SSMSParameters
|
||||
public BoolParameter _UseSSMS = new BoolParameter(false);
|
||||
public ClampedFloatParameter _Threshold = new ClampedFloatParameter(value: 0, min: -1, max: 1);
|
||||
public FloatParameter _SoftKnee = new FloatParameter(0.5f);
|
||||
public ClampedFloatParameter _Radius = new ClampedFloatParameter(value: 7, min: 1, max: 7);
|
||||
public ClampedFloatParameter _BlurWeight = new ClampedFloatParameter(value: 1, min: 0.1f, max: 100);
|
||||
public ClampedFloatParameter _Intensity = new ClampedFloatParameter(value: 1, min: 0, max: 1);
|
||||
public BoolParameter _HighQuality = new BoolParameter(false);
|
||||
public BoolParameter _AntiFlicker = new BoolParameter(false);
|
||||
public TextureParameter _FadeRamp = new TextureParameter(null);
|
||||
#endregion
|
||||
|
||||
public bool IsActive() => _FogIntensity.value > 0;
|
||||
|
||||
//public bool IsTileCompatible() => true;
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfd05c3d9e2dde840807ee2df7b4f57e
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 259457
|
||||
packageName: 'Better Fog: Height Fog, Light Scattering & More'
|
||||
packageVersion: 3.1
|
||||
assetPath: Assets/INab Studio/Post Processing Assets/Better Fog/Core URP 6/Scripts/BetterFogVolumeComponent.cs
|
||||
uploadId: 916910
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 945e3c050ab43484e946d4adde215f8b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+263
@@ -0,0 +1,263 @@
|
||||
using INab.BetterFog.Core;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Rendering;
|
||||
|
||||
namespace INab.BetterFog.URP
|
||||
{
|
||||
[CustomEditor(typeof(INab.BetterFog.URP.BetterFogVolumeComponent))]
|
||||
public class BetterFogVolumeComponentEditor : VolumeComponentEditor
|
||||
{
|
||||
// FogParameters
|
||||
SerializedDataParameter _FogIntensity;
|
||||
SerializedDataParameter _EnergyLoss;
|
||||
SerializedDataParameter _FogColor;
|
||||
SerializedDataParameter _UseGradient;
|
||||
SerializedDataParameter _GradientStart;
|
||||
SerializedDataParameter _GradientEnd;
|
||||
SerializedDataParameter _GradientTexture;
|
||||
SerializedDataParameter _UseSunLight;
|
||||
SerializedDataParameter _SunColor;
|
||||
SerializedDataParameter _SunIntensity;
|
||||
SerializedDataParameter _SunPower;
|
||||
SerializedDataParameter _UseDistanceFog;
|
||||
SerializedDataParameter _UseRadialDistance;
|
||||
SerializedDataParameter _FogType;
|
||||
SerializedDataParameter _DistanceFogOffset;
|
||||
SerializedDataParameter _SceneStart;
|
||||
SerializedDataParameter _SceneEnd;
|
||||
SerializedDataParameter _FogDensity;
|
||||
SerializedDataParameter _UseSkyboxHeightFog;
|
||||
SerializedDataParameter _SkyboxFogOffset;
|
||||
SerializedDataParameter _SkyboxFogHardness;
|
||||
SerializedDataParameter _SkyboxFogIntensity;
|
||||
SerializedDataParameter _SkyboxFill;
|
||||
SerializedDataParameter _UseHeightFog;
|
||||
SerializedDataParameter _Height;
|
||||
SerializedDataParameter _HeightDensity;
|
||||
SerializedDataParameter _HeightFogType;
|
||||
SerializedDataParameter _UseNoise;
|
||||
SerializedDataParameter _NoiseAffect;
|
||||
SerializedDataParameter _NoiseIntensity;
|
||||
SerializedDataParameter _NoiseDistanceEnd;
|
||||
SerializedDataParameter _NoiseEndHardness;
|
||||
SerializedDataParameter _Scale1;
|
||||
SerializedDataParameter _Lerp1;
|
||||
SerializedDataParameter _NoiseSpeed1;
|
||||
SerializedDataParameter _NoiseTimeScale1;
|
||||
|
||||
// SSMSParameters
|
||||
SerializedDataParameter _UseSSMS;
|
||||
SerializedDataParameter _Threshold;
|
||||
SerializedDataParameter _SoftKnee;
|
||||
SerializedDataParameter _Radius;
|
||||
SerializedDataParameter _BlurWeight;
|
||||
SerializedDataParameter _Intensity;
|
||||
SerializedDataParameter _HighQuality;
|
||||
SerializedDataParameter _AntiFlicker;
|
||||
SerializedDataParameter _FadeRamp;
|
||||
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
var o = new PropertyFetcher<BetterFogVolumeComponent>(serializedObject);
|
||||
|
||||
_FogIntensity = Unpack(o.Find(x => x._FogIntensity));
|
||||
_EnergyLoss = Unpack(o.Find(x => x._EnergyLoss));
|
||||
_FogColor = Unpack(o.Find(x => x._FogColor));
|
||||
_UseGradient = Unpack(o.Find(x => x._UseGradient));
|
||||
_GradientStart = Unpack(o.Find(x => x._GradientStart));
|
||||
_GradientEnd = Unpack(o.Find(x => x._GradientEnd));
|
||||
_GradientTexture = Unpack(o.Find(x => x._GradientTexture));
|
||||
_UseSunLight = Unpack(o.Find(x => x._UseSunLight));
|
||||
_SunColor = Unpack(o.Find(x => x._SunColor));
|
||||
_SunIntensity = Unpack(o.Find(x => x._SunIntensity));
|
||||
_SunPower = Unpack(o.Find(x => x._SunPower));
|
||||
_UseDistanceFog = Unpack(o.Find(x => x._UseDistanceFog));
|
||||
_UseRadialDistance = Unpack(o.Find(x => x._UseRadialDistance));
|
||||
_FogType = Unpack(o.Find(x => x._FogType));
|
||||
_DistanceFogOffset = Unpack(o.Find(x => x._DistanceFogOffset));
|
||||
_SceneStart = Unpack(o.Find(x => x._SceneStart));
|
||||
_SceneEnd = Unpack(o.Find(x => x._SceneEnd));
|
||||
_FogDensity = Unpack(o.Find(x => x._FogDensity));
|
||||
_UseSkyboxHeightFog = Unpack(o.Find(x => x._UseSkyboxHeightFog));
|
||||
_SkyboxFogOffset = Unpack(o.Find(x => x._SkyboxFogOffset));
|
||||
_SkyboxFogHardness = Unpack(o.Find(x => x._SkyboxFogHardness));
|
||||
_SkyboxFogIntensity = Unpack(o.Find(x => x._SkyboxFogIntensity));
|
||||
_SkyboxFill = Unpack(o.Find(x => x._SkyboxFill));
|
||||
_UseHeightFog = Unpack(o.Find(x => x._UseHeightFog));
|
||||
_Height = Unpack(o.Find(x => x._Height));
|
||||
_HeightDensity = Unpack(o.Find(x => x._HeightDensity));
|
||||
_HeightFogType = Unpack(o.Find(x => x._HeightFogType));
|
||||
_UseNoise = Unpack(o.Find(x => x._UseNoise));
|
||||
_NoiseAffect = Unpack(o.Find(x => x._NoiseAffect));
|
||||
_NoiseIntensity = Unpack(o.Find(x => x._NoiseIntensity));
|
||||
_NoiseDistanceEnd = Unpack(o.Find(x => x._NoiseDistanceEnd));
|
||||
_NoiseEndHardness = Unpack(o.Find(x => x._NoiseEndHardness));
|
||||
_Scale1 = Unpack(o.Find(x => x._Scale1));
|
||||
_Lerp1 = Unpack(o.Find(x => x._Lerp1));
|
||||
_NoiseSpeed1 = Unpack(o.Find(x => x._NoiseSpeed1));
|
||||
_NoiseTimeScale1 = Unpack(o.Find(x => x._NoiseTimeScale1));
|
||||
|
||||
// SSMSParameters
|
||||
_UseSSMS = Unpack(o.Find(x => x._UseSSMS));
|
||||
_Threshold = Unpack(o.Find(x => x._Threshold));
|
||||
_SoftKnee = Unpack(o.Find(x => x._SoftKnee));
|
||||
_Radius = Unpack(o.Find(x => x._Radius));
|
||||
_BlurWeight = Unpack(o.Find(x => x._BlurWeight));
|
||||
_Intensity = Unpack(o.Find(x => x._Intensity));
|
||||
_HighQuality = Unpack(o.Find(x => x._HighQuality));
|
||||
_AntiFlicker = Unpack(o.Find(x => x._AntiFlicker));
|
||||
_FadeRamp = Unpack(o.Find(x => x._FadeRamp));
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.LabelField("Main", BetterFogUtility.centeredBoldLabel);
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
|
||||
{
|
||||
PropertyField(_FogIntensity);
|
||||
PropertyField(_EnergyLoss);
|
||||
}
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Colors", BetterFogUtility.centeredBoldLabel);
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
|
||||
{
|
||||
PropertyField(_UseGradient);
|
||||
|
||||
if (_UseGradient.value.boolValue)
|
||||
{
|
||||
PropertyField(_GradientStart);
|
||||
PropertyField(_GradientEnd);
|
||||
PropertyField(_GradientTexture);
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField(_FogColor);
|
||||
}
|
||||
}
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Sun Light", BetterFogUtility.centeredBoldLabel);
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
|
||||
{
|
||||
PropertyField(_UseSunLight);
|
||||
|
||||
if (_UseSunLight.value.boolValue)
|
||||
{
|
||||
PropertyField(_SunColor);
|
||||
PropertyField(_SunIntensity);
|
||||
PropertyField(_SunPower);
|
||||
}
|
||||
}
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Distance Fog", BetterFogUtility.centeredBoldLabel);
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
|
||||
{
|
||||
PropertyField(_UseDistanceFog);
|
||||
|
||||
if (_UseDistanceFog.value.boolValue)
|
||||
{
|
||||
PropertyField(_UseRadialDistance);
|
||||
PropertyField(_DistanceFogOffset);
|
||||
PropertyField(_FogType);
|
||||
|
||||
if (_FogType.value.enumValueIndex == 0)
|
||||
{
|
||||
PropertyField(_SceneStart);
|
||||
PropertyField(_SceneEnd);
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField(_FogDensity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Skybox Height Fog", BetterFogUtility.centeredBoldLabel);
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
|
||||
{
|
||||
PropertyField(_UseSkyboxHeightFog);
|
||||
|
||||
if (_UseSkyboxHeightFog.value.boolValue)
|
||||
{
|
||||
PropertyField(_SkyboxFogOffset);
|
||||
PropertyField(_SkyboxFogHardness);
|
||||
PropertyField(_SkyboxFogIntensity);
|
||||
PropertyField(_SkyboxFill);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Height Fog", BetterFogUtility.centeredBoldLabel);
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
|
||||
{
|
||||
PropertyField(_UseHeightFog);
|
||||
|
||||
if (_UseHeightFog.value.boolValue)
|
||||
{
|
||||
PropertyField(_Height);
|
||||
PropertyField(_HeightDensity);
|
||||
PropertyField(_HeightFogType);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("3D Noise", BetterFogUtility.centeredBoldLabel);
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
|
||||
{
|
||||
PropertyField(_UseNoise);
|
||||
|
||||
|
||||
if (_UseNoise.value.boolValue)
|
||||
{
|
||||
PropertyField(_NoiseAffect);
|
||||
PropertyField(_NoiseIntensity);
|
||||
PropertyField(_NoiseDistanceEnd);
|
||||
PropertyField(_NoiseEndHardness);
|
||||
PropertyField(_Scale1);
|
||||
PropertyField(_Lerp1);
|
||||
PropertyField(_NoiseSpeed1);
|
||||
PropertyField(_NoiseTimeScale1);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Screen Space Multiple Scattering", BetterFogUtility.centeredBoldLabel);
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
|
||||
{
|
||||
// SSMSParameters
|
||||
PropertyField(_UseSSMS);
|
||||
|
||||
if (!_UseSSMS.value.boolValue)
|
||||
{
|
||||
//EditorGUILayout.Space();
|
||||
//EditorGUILayout.HelpBox("SSMS is ", MessageType.Info);
|
||||
//EditorGUILayout.Space();
|
||||
}
|
||||
else
|
||||
{
|
||||
PropertyField(_Threshold);
|
||||
PropertyField(_SoftKnee);
|
||||
PropertyField(_Radius);
|
||||
PropertyField(_BlurWeight);
|
||||
PropertyField(_Intensity);
|
||||
PropertyField(_HighQuality);
|
||||
PropertyField(_AntiFlicker);
|
||||
PropertyField(_FadeRamp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f5e36eb07caaf664c9ea53650a603087
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 259457
|
||||
packageName: 'Better Fog: Height Fog, Light Scattering & More'
|
||||
packageVersion: 3.1
|
||||
assetPath: Assets/INab Studio/Post Processing Assets/Better Fog/Core URP 6/Scripts/Editor/BetterFogVolumeComponentEditor.cs
|
||||
uploadId: 916910
|
||||
Reference in New Issue
Block a user