diff --git a/Assets/Materials/Brushes/Wormhole Lighting.mat b/Assets/Materials/Brushes/Wormhole Lighting.mat index a12af25d6..988398c75 100644 --- a/Assets/Materials/Brushes/Wormhole Lighting.mat +++ b/Assets/Materials/Brushes/Wormhole Lighting.mat @@ -58,7 +58,7 @@ Material: m_Floats: - _BumpScale: 1 - _Cutoff: 1 - - _Depth: 15 + - _Depth: 3 - _DetailNormalMapScale: 1 - _DstBlend: 0 - _Frequency: 6.2832 @@ -70,7 +70,7 @@ Material: - _OcclusionStrength: 1 - _Parallax: 0.02 - _Phase: 0 - - _Power: 128 + - _Power: 32 - _SinePower: 1.25 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 diff --git a/Assets/Prefabs/RPG/Planets/Sun.prefab b/Assets/Prefabs/RPG/Planets/Sun.prefab index e28159a2f..d8dea790e 100644 --- a/Assets/Prefabs/RPG/Planets/Sun.prefab +++ b/Assets/Prefabs/RPG/Planets/Sun.prefab @@ -508,7 +508,7 @@ Light: m_Type: 2 m_Shape: 0 m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 0.333 + m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_InnerSpotAngle: 21.80208 diff --git a/Assets/Resources/Prefabs/Ships/Longinus.prefab b/Assets/Resources/Prefabs/Ships/Longinus.prefab index 7a7e0c796..401b9261c 100644 --- a/Assets/Resources/Prefabs/Ships/Longinus.prefab +++ b/Assets/Resources/Prefabs/Ships/Longinus.prefab @@ -1732,7 +1732,6 @@ GameObject: - component: {fileID: 4028928668500718027} - component: {fileID: 6423368230359933839} - component: {fileID: 8693096897863455396} - - component: {fileID: 2748941174002375643} m_Layer: 0 m_Name: Cube.043 m_TagString: Untagged @@ -1811,18 +1810,6 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &2748941174002375643 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8882633467169423962} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1cc21c48ee370cb42a042622dd21640d, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1001 &3244127278357174761 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Main Menu.unity b/Assets/Scenes/Main Menu.unity index 40ac1ed1d..fbcd8dc4d 100644 --- a/Assets/Scenes/Main Menu.unity +++ b/Assets/Scenes/Main Menu.unity @@ -2439,7 +2439,7 @@ PrefabInstance: - target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99, type: 3} propertyPath: m_AnchoredPosition.x - value: 60.98 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3664209305474245377, guid: 3d8d9cbf10b12214e98891c1f03c1e99, type: 3} @@ -2464,7 +2464,7 @@ PrefabInstance: - target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99, type: 3} propertyPath: m_AnchoredPosition.x - value: 55.675 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3664209306888449100, guid: 3d8d9cbf10b12214e98891c1f03c1e99, type: 3} diff --git a/Assets/Scripts/Zone Display/VolumeCloudRenderer.cs b/Assets/Scripts/Zone Display/VolumeCloudRenderer.cs index 2cc5127a5..952998e59 100644 --- a/Assets/Scripts/Zone Display/VolumeCloudRenderer.cs +++ b/Assets/Scripts/Zone Display/VolumeCloudRenderer.cs @@ -10,7 +10,8 @@ using UnityEngine.Rendering; /// Generate halton sequence. /// code from unity post-processing stack. /// -public class HaltonSequence { +public class HaltonSequence +{ public int radix = 3; private int storedIndex = 0; public float Get() { @@ -28,7 +29,8 @@ public class HaltonSequence { } } -public enum Quality { +public enum Quality +{ Low, Normal, //Low sample count High, //High sample count and high shadow sample count. @@ -41,7 +43,8 @@ public enum Quality { [ImageEffectAllowedInSceneView] [ExecuteInEditMode,RequireComponent(typeof(Camera))] [ImageEffectOpaque] - public class VolumeCloudRenderer : EffectBase { +public class VolumeCloudRenderer : EffectBase +{ [Header("Render Settings")] [Range(0, 2)] public int downSample = 1; @@ -56,7 +59,6 @@ public enum Quality { private HaltonSequence sequence = new HaltonSequence() { radix = 3 }; // The index of 4x4 pixels. private int frameIndex = 0; - private float bayerOffsetIndex = 0; private bool firstFrame = true; [SerializeField] diff --git a/Assets/Shaders/GlowFade.shader b/Assets/Shaders/GlowFade.shader index eb5dbbdde..1c9b06fca 100644 --- a/Assets/Shaders/GlowFade.shader +++ b/Assets/Shaders/GlowFade.shader @@ -29,8 +29,10 @@ Shader "Aetheria/GlowFade" CGPROGRAM #include "Dither Functions.cginc" + #include "Assets/Shaders/Volumetric.cginc" + // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows + #pragma surface surf Standard fullforwardshadows noambient vertex:vert // Use shader model 3.0 target, to get nicer looking lighting #pragma target 3.0 @@ -41,14 +43,7 @@ Shader "Aetheria/GlowFade" sampler2D _FadeTex; sampler2D _BumpMap; - struct Input - { - float2 uv_MainTex; - float2 uv_FadeTex; - float4 screenPos; - }; - - half _Fade; + //half _Fade; half _FadeSharpness; half _FadeEdge; half _Glossiness; @@ -58,29 +53,55 @@ Shader "Aetheria/GlowFade" fixed4 _Color; half3 _EdgeColor; + struct Input + { + float2 uv_MainTex; + float2 uv_FadeTex; + float4 screenPos; + float3 ambientColor; + }; + + float4 VolumeSampleColorSimple(float3 pos, float3 normal) + { + float d = density(pos); + float2 uv = getUV(pos); + const float lodRange = 3; + float3 tint = tex2Dlod(_NebulaTint, float4(uv.x, uv.y, 0, 3 + lodRange + dot(normal, float3(0,1,0))*lodRange)); + return float4(tint, d); + } + + void vert (inout appdata_full v, out Input o) { + UNITY_INITIALIZE_OUTPUT(Input,o); + float3 worldPos = mul(unity_ObjectToWorld, v.vertex); + float3 worldNormal = UnityObjectToWorldNormal(v.normal); + o.ambientColor = VolumeSampleColorSimple(worldPos, worldNormal).rgb; + } + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. // #pragma instancing_options assumeuniformscaling UNITY_INSTANCING_BUFFER_START(Props) // put more per-instance properties here + UNITY_DEFINE_INSTANCED_PROP(half, _Fade) UNITY_INSTANCING_BUFFER_END(Props) void surf (Input IN, inout SurfaceOutputStandard o) { - half f = tex2D (_FadeTex, IN.uv_FadeTex).r + (1-_FadeEdge-_Fade); - half3 e = _EdgeColor * smoothstep(1 - _FadeEdge, 1, f); - o.Emission = e; + half f = tex2D (_FadeTex, IN.uv_FadeTex).r + (1-_FadeEdge - UNITY_ACCESS_INSTANCED_PROP(_Fade_arr, _Fade)); + // Apply screen space dithering float2 screenUV = IN.screenPos.xy / IN.screenPos.w; ditherClip(screenUV, _FadeSharpness - f * _FadeSharpness); + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; o.Albedo = c.rgb; + fixed oc = tex2D (_OcclusionMap, IN.uv_MainTex).r; + o.Occlusion = oc * _OcclusionStrength; + o.Emission = _EdgeColor * smoothstep(1 - _FadeEdge, 1, f) + IN.ambientColor * c.rgb * 10; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex)) * _BumpScale; fixed4 m = tex2D (_MetallicGlossMap, IN.uv_MainTex); o.Metallic = _Metallic * m.r; o.Smoothness = _Glossiness * m.a; - fixed4 oc = tex2D (_OcclusionMap, IN.uv_MainTex); - o.Occlusion = oc.r * _OcclusionStrength; } ENDCG } diff --git a/Assets/Shaders/Volumetric.cginc b/Assets/Shaders/Volumetric.cginc index d1ed03801..3993ebdba 100644 --- a/Assets/Shaders/Volumetric.cginc +++ b/Assets/Shaders/Volumetric.cginc @@ -155,10 +155,6 @@ float4 VolumeSampleColor(float3 pos) float d = density(pos); float2 uv = getUV(pos); float3 tint = tex2Dlod(_NebulaTint, float4(uv.x, uv.y, 0, pow(max(.01,d), _TintLodExponent))); - //float2 tintGrad = tintGradient(pos, uv, 1 / pow(density, .25), tint); - //float3 tintNormal = normalize(float3(tintGrad.x, 0, tintGrad.y)); - //tint *= abs(dot(normal, float3(0,-1,0))); - // pow(abs(1-density), _TintExponent) const float albedo = smoothstep(0,-250,pos.y) * pow(max(.1,d), _TintExponent) * _NebulaLuminance; return float4(albedo*tint, d); } diff --git a/GameData/PlayerSettings.msgpack b/GameData/PlayerSettings.msgpack index 4b59a1305..88608b67d 100644 --- a/GameData/PlayerSettings.msgpack +++ b/GameData/PlayerSettings.msgpack @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc6b519f0ee15e522179e90da142ec860e942f3d9bb16d7ec8c85fb703f834f3 -size 31022 +oid sha256:a5e03ff137015e92d309e751d010e384b13c0a4b09cd6e579646299e3776c5ef +size 28351 diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 2f103ed98..d7bcbe91e 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9273a0bfde3f616b5f7ac9ceea9583c6e1cc357d64ea16cd948ef51ea1fa4f84 -size 2118 +oid sha256:e51023be8350fba51546a33ef20515bb5ecb714bfa51f1aea5254db518d7aa67 +size 2622