From e585a8c3b18be3d46ac9863affa2579a5bf16ed9 Mon Sep 17 00:00:00 2001 From: Reinier Vens Date: Wed, 13 Jul 2022 01:53:59 +0100 Subject: [PATCH] Sky Glow + More Nebula Tweaking --- .../Materials/Brushes/Sector Patch Depth Small.mat | 2 +- .../Materials/Brushes/Sector Patch Displacement.mat | 2 +- Assets/Materials/Brushes/Sector Tint.mat | 4 ++-- Assets/Materials/UI/Map Gravity Lines.mat | 2 +- .../Plugins/VolumeCloud/Shaders/CloudShader.shader | 10 +--------- Assets/Resources/Settings.asset | 4 ++-- Assets/Scenes/ARPG.unity | 12 ++++++------ .../Postprocessing Profile Main Menu.asset | 4 ++-- .../ARPG_Profiles/Postprocessing Profile.asset | 4 ++-- Assets/Scenes/Main Menu.unity | 2 +- Assets/Scripts/ServerShared/Environment.cs | 2 ++ Assets/Scripts/Zone Display/VolumeSampling.cs | 3 +++ Assets/Shaders/Compute/Stardust/Stardust.compute | 4 ++-- Assets/Shaders/Compute/Stardust/Stardust.mat | 6 +++--- Assets/Shaders/Volumetric.cginc | 10 +++++++--- GameData/PlayerSettings.msgpack | 4 ++-- 16 files changed, 38 insertions(+), 37 deletions(-) diff --git a/Assets/Materials/Brushes/Sector Patch Depth Small.mat b/Assets/Materials/Brushes/Sector Patch Depth Small.mat index a9e112d29..1da54be14 100644 --- a/Assets/Materials/Brushes/Sector Patch Depth Small.mat +++ b/Assets/Materials/Brushes/Sector Patch Depth Small.mat @@ -57,7 +57,7 @@ Material: m_Offset: {x: 0, y: 0} m_Floats: - _BumpScale: 1 - - _Constant: -5 + - _Constant: 0 - _Cutoff: 0.5 - _Depth: 10 - _DetailNormalMapScale: 1 diff --git a/Assets/Materials/Brushes/Sector Patch Displacement.mat b/Assets/Materials/Brushes/Sector Patch Displacement.mat index 09aeda5ab..655f3fb06 100644 --- a/Assets/Materials/Brushes/Sector Patch Displacement.mat +++ b/Assets/Materials/Brushes/Sector Patch Displacement.mat @@ -57,7 +57,7 @@ Material: m_Offset: {x: 0, y: 0} m_Floats: - _BumpScale: 1 - - _Constant: -30 + - _Constant: -1 - _Cutoff: 0.5 - _Depth: 10 - _DetailNormalMapScale: 1 diff --git a/Assets/Materials/Brushes/Sector Tint.mat b/Assets/Materials/Brushes/Sector Tint.mat index 97e324202..4ecf9fb5a 100644 --- a/Assets/Materials/Brushes/Sector Tint.mat +++ b/Assets/Materials/Brushes/Sector Tint.mat @@ -58,7 +58,7 @@ Material: m_Floats: - _BumpScale: 1 - _Cutoff: 1 - - _Depth: 0.01 + - _Depth: 0.025 - _DetailNormalMapScale: 1 - _DstBlend: 0 - _Frequency: 6.2832 @@ -78,6 +78,6 @@ Material: - _UVSec: 0 - _ZWrite: 1 m_Colors: - - _Color: {r: 0.85, g: 0.92980295, b: 1, a: 1} + - _Color: {r: 0.496, g: 0.5813884, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Materials/UI/Map Gravity Lines.mat b/Assets/Materials/UI/Map Gravity Lines.mat index 749d876be..fb60f1a9f 100644 --- a/Assets/Materials/UI/Map Gravity Lines.mat +++ b/Assets/Materials/UI/Map Gravity Lines.mat @@ -86,7 +86,7 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _Scale: 0.5 + - _Scale: 7.410445 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudShader.shader b/Assets/Plugins/VolumeCloud/Shaders/CloudShader.shader index fbfda0821..9ae3b1baf 100644 --- a/Assets/Plugins/VolumeCloud/Shaders/CloudShader.shader +++ b/Assets/Plugins/VolumeCloud/Shaders/CloudShader.shader @@ -343,16 +343,8 @@ Shader "Yangrc/CloudShader" half4 mcol = tex2D(_MainTex,i.uv); float4 currSample = tex2D(_CloudTex, i.uv); - // float distance; - // float density; - // unpack(currSample.a, distance, density); - // float packed = pack(1,1); - // unpack(packed, distance, density); - - float4 result; - result = currSample; - return half4(mcol.rgb * (1 - result.a) + result.rgb, 1); + return half4(mcol.rgb * (1 - currSample.a) + currSample.rgb, 1); } ENDCG } diff --git a/Assets/Resources/Settings.asset b/Assets/Resources/Settings.asset index 844987a31..50818f74d 100644 --- a/Assets/Resources/Settings.asset +++ b/Assets/Resources/Settings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6bc6efe53038a29fd90adddc230e251bef3e17bf10d1996ec5c041a641cbda48 -size 13041 +oid sha256:f9e4306defe954208e5c67e9e7981b914c419177f360bf36ee0c21c0fc16fe87 +size 13098 diff --git a/Assets/Scenes/ARPG.unity b/Assets/Scenes/ARPG.unity index 5f307d3dd..28259edc5 100644 --- a/Assets/Scenes/ARPG.unity +++ b/Assets/Scenes/ARPG.unity @@ -16181,13 +16181,13 @@ MonoBehaviour: TargetCamera: {fileID: 2115559089} ParticleCalculation: {fileID: 7200000, guid: f53a4ba56f0db2a49ad9f68150bf298a, type: 3} ParticleMaterial: {fileID: 2100000, guid: fc00c35c3c370774c88d55240b6538ce, type: 2} - Span: 128 - Speed: -0.15 + Span: 256 + Speed: -0.5 MinimumSize: 0 - MaximumSize: 0.75 + MaximumSize: 0.5 Spacing: 6 - Ceiling: -300 - Floor: -20 + Ceiling: -250 + Floor: -25 HeightExponent: 100000 NebulaSurfaceHeight: {fileID: 8400000, guid: 2fc21a9d3e9647948b56e384cd9378b3, type: 2} NebulaPatchHeight: {fileID: 8400000, guid: c618a6b20b3c7394590c59a9fa467e86, type: 2} @@ -30715,7 +30715,7 @@ MonoBehaviour: m_EditorClassIdentifier: configuration: {fileID: 11400000, guid: a15886e93ac3e7847861da392782f13d, type: 2} downSample: 0 - quality: 0 + quality: 2 allowCloudFrontObject: 1 useApSystem: 0 useHierarchicalHeightMap: 0 diff --git a/Assets/Scenes/ARPG_Profiles/Postprocessing Profile Main Menu.asset b/Assets/Scenes/ARPG_Profiles/Postprocessing Profile Main Menu.asset index 906e57666..815941f7c 100644 --- a/Assets/Scenes/ARPG_Profiles/Postprocessing Profile Main Menu.asset +++ b/Assets/Scenes/ARPG_Profiles/Postprocessing Profile Main Menu.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa0c97918c5f9d4d7e9e501ed919fe1448d5e316294b2d79447abaaffbc6c2c5 -size 27013 +oid sha256:49eb8589a5a153df28beddeffb7a00c095788a8790d4a4a84c72eef4eb0fac4f +size 27015 diff --git a/Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset b/Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset index 04ea539a6..81cb135b1 100644 --- a/Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset +++ b/Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:90c6dd8c1b03f661838c1c1abdf7fb977c63c752df96ec2819131be0c1548aec -size 26996 +oid sha256:6a96181c8e491f441ffad52d8bca3719667c5e58cc3f4050caab6833d044c3ff +size 27005 diff --git a/Assets/Scenes/Main Menu.unity b/Assets/Scenes/Main Menu.unity index 0b7794236..1516cbcdc 100644 --- a/Assets/Scenes/Main Menu.unity +++ b/Assets/Scenes/Main Menu.unity @@ -1354,7 +1354,7 @@ MonoBehaviour: m_EditorClassIdentifier: configuration: {fileID: 11400000, guid: a15886e93ac3e7847861da392782f13d, type: 2} downSample: 0 - quality: 0 + quality: 2 allowCloudFrontObject: 1 useApSystem: 0 useHierarchicalHeightMap: 0 diff --git a/Assets/Scripts/ServerShared/Environment.cs b/Assets/Scripts/ServerShared/Environment.cs index 174388e22..11fd0a7a4 100644 --- a/Assets/Scripts/ServerShared/Environment.cs +++ b/Assets/Scripts/ServerShared/Environment.cs @@ -19,6 +19,8 @@ public class NebulaSettings { [JsonProperty("fillDensity"), Key(0)] public float FillDensity; [JsonProperty("fillDistance"), Key(1)] public float FillDistance; + [JsonProperty("fillExponent"), Key(11)] public float FillExponent; + [JsonProperty("fillOffset"), Key(12)] public float FillOffset; [JsonProperty("fogDensity"), Key(2)] public float FloorDensity; [JsonProperty("cloudDensity"), Key(3)] public float PatchDensity; [JsonProperty("fogOffset"), Key(4)] public float FloorOffset; diff --git a/Assets/Scripts/Zone Display/VolumeSampling.cs b/Assets/Scripts/Zone Display/VolumeSampling.cs index e7c909bac..6f0ddc5b5 100644 --- a/Assets/Scripts/Zone Display/VolumeSampling.cs +++ b/Assets/Scripts/Zone Display/VolumeSampling.cs @@ -88,6 +88,9 @@ public class VolumeSampling : MonoBehaviour Shader.SetGlobalTexture("_NebulaTint", NebulaTint); Shader.SetGlobalFloat("_NebulaFillDensity", Settings.DefaultEnvironment.Nebula.FillDensity); + Shader.SetGlobalFloat("_NebulaFillDistance", Settings.DefaultEnvironment.Nebula.FillDistance); + Shader.SetGlobalFloat("_NebulaFillExponent", Settings.DefaultEnvironment.Nebula.FillExponent); + Shader.SetGlobalFloat("_NebulaFillOffset", Settings.DefaultEnvironment.Nebula.FillOffset); Shader.SetGlobalFloat("_NebulaFloorDensity", Settings.DefaultEnvironment.Nebula.FloorDensity); Shader.SetGlobalFloat("_NebulaPatchDensity", Settings.DefaultEnvironment.Nebula.PatchDensity); Shader.SetGlobalFloat("_NebulaFloorOffset", Settings.DefaultEnvironment.Nebula.FloorOffset); diff --git a/Assets/Shaders/Compute/Stardust/Stardust.compute b/Assets/Shaders/Compute/Stardust/Stardust.compute index 08a1404aa..84bb19606 100644 --- a/Assets/Shaders/Compute/Stardust/Stardust.compute +++ b/Assets/Shaders/Compute/Stardust/Stardust.compute @@ -135,7 +135,7 @@ void UpdateParticles(uint3 id : SV_DispatchThreadID, int3 groupID : SV_GroupThre float noise; const float3 flowDir = flow(particles[id.x].position, noise); particles[id.x].position += flowDir * (lifetime * noise); - const float d = pow(density(particles[id.x].position) + .01, 0.15); - particles[id.x].size = lerp(minimumSize, maximumSize, saturate(RandomValue() * d)) * parabola(lifetime, 2); + const float d = pow(density(particles[id.x].position) + .01, 0.1); + particles[id.x].size = lerp(minimumSize, maximumSize, saturate(RandomValue())) * parabola(lifetime, 2); particles[id.x].color = HueTexture.SampleLevel(samplerHueTexture, float2(RandomValue(), 0.0f), 0.0f).rgb * d; } \ No newline at end of file diff --git a/Assets/Shaders/Compute/Stardust/Stardust.mat b/Assets/Shaders/Compute/Stardust/Stardust.mat index 2c0e6af90..616779c5b 100644 --- a/Assets/Shaders/Compute/Stardust/Stardust.mat +++ b/Assets/Shaders/Compute/Stardust/Stardust.mat @@ -60,10 +60,10 @@ Material: - _BumpScale: 1 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - - _DistanceIntensityExponent: 3.5 - - _DistanceSizeExponent: 0.5 + - _DistanceIntensityExponent: 1 + - _DistanceSizeExponent: 0.33 - _DstBlend: 0 - - _EmissionGain: 0.268 + - _EmissionGain: 0.496 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 diff --git a/Assets/Shaders/Volumetric.cginc b/Assets/Shaders/Volumetric.cginc index 0439d1fe1..d1ed03801 100644 --- a/Assets/Shaders/Volumetric.cginc +++ b/Assets/Shaders/Volumetric.cginc @@ -46,6 +46,9 @@ float4 _NebulaTint_TexelSize; uniform float3 _GridTransform; uniform half _NebulaFillDensity, + _NebulaFillDistance, + _NebulaFillExponent, + _NebulaFillOffset, _NebulaFloorDensity, _NebulaPatchDensity, _NebulaFloorOffset, @@ -125,7 +128,8 @@ float density(float3 pos) float2 uv = getUV(pos); const float surfaceDisp = tex2Dlod(_NebulaSurfaceHeight, half4(uv, 0, 0)).r; const float dist = pos.y + surfaceDisp; - float d = pow((dist+20)/300,-2) * _NebulaFillDensity; + float d = pow(abs(dist+_NebulaFillOffset)/_NebulaFillDistance,-_NebulaFillExponent) * _NebulaFillDensity; + //d += pow(abs(dist+_NebulaFillOffset)/(_NebulaFillDistance*10),1/_NebulaFillExponent) * _NebulaFillDensity/4; if(dist < _SafetyDistance) { const float heightFade = smoothstep(_SafetyDistance,_SafetyDistance*.75,dist); @@ -138,8 +142,8 @@ float density(float3 pos) pos.y += (noise1 + noise2) * heightFade; const float lerp3 = frac(_Time.x * _FlowSpeed * 2); const float lerp4 = frac(_Time.x * _FlowSpeed * 2 + .5); - const float noise3 = pow(triNoise3d((pos+fl * lerp3) / _NoiseScale * 4), _NoiseExponent) * _NoiseAmplitude * tri2(lerp3) / 2; - const float noise4 = pow(triNoise3d((pos+fl * lerp4) / _NoiseScale * 4), _NoiseExponent) * _NoiseAmplitude * tri2(lerp4) / 2; + const float noise3 = pow(triNoise3d((pos+fl * lerp3) / _NoiseScale * 8), _NoiseExponent) * _NoiseAmplitude * tri2(lerp3) / 2; + const float noise4 = pow(triNoise3d((pos+fl * lerp4) / _NoiseScale * 8), _NoiseExponent) * _NoiseAmplitude * tri2(lerp4) / 2; pos.y -= (noise3 + noise4) * heightFade; d += cloudDensity(pos, surfaceDisp); } diff --git a/GameData/PlayerSettings.msgpack b/GameData/PlayerSettings.msgpack index ed16776fd..0c805bba4 100644 --- a/GameData/PlayerSettings.msgpack +++ b/GameData/PlayerSettings.msgpack @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b1ac15ed3a5fe86725731b46db845d98628b9778006a988f0837ba7c16f662f -size 54051 +oid sha256:4f609162c1768d2ba3c1855c361bf3654320aaa56624b9f854f41e1fa137b2ce +size 6916