From f9491e09873822a650d00d2d30fe8ee0b471ebb8 Mon Sep 17 00:00:00 2001 From: lghassen Date: Wed, 28 Mar 2018 21:00:30 +0200 Subject: [PATCH 01/26] offload particle Quad creation and transform to GPU using geometry shader and point mesh, eliminates CPU cost of volumetrics meshrenderers --- Assets/Shaders/CloudVolumeParticle.shader | 217 +++++++++++++++------- Atmosphere/CloudsVolume.cs | 3 + Atmosphere/VolumeSection.cs | 54 +++++- ShaderLoader/ShaderLoader.cs | 2 +- Utils/HexSeg.cs | 57 ++++++ 5 files changed, 260 insertions(+), 73 deletions(-) diff --git a/Assets/Shaders/CloudVolumeParticle.shader b/Assets/Shaders/CloudVolumeParticle.shader index fda42a56..d8d48eb2 100644 --- a/Assets/Shaders/CloudVolumeParticle.shader +++ b/Assets/Shaders/CloudVolumeParticle.shader @@ -1,7 +1,4 @@ -// Upgrade NOTE: commented out 'float4x4 _CameraToWorld', a built-in variable -// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' - -Shader "EVE/CloudVolumeParticle" { +Shader "EVE/CloudVolumeParticle" { Properties { _Tex("Particle Texture", 2D) = "white" {} _MainTex("Main (RGB)", 2D) = "white" {} @@ -30,7 +27,10 @@ Shader "EVE/CloudVolumeParticle" { Fog { Mode Global} AlphaTest Greater 0 ColorMask RGB - Cull Back Lighting On ZWrite Off + //Cull Back + Cull Off + Lighting On + ZWrite Off SubShader { Pass { @@ -40,10 +40,11 @@ Shader "EVE/CloudVolumeParticle" { CGPROGRAM #include "EVEUtils.cginc" - #pragma target 3.0 + #pragma target 4.0 #pragma glsl #pragma vertex vert #pragma fragment frag + #pragma geometry geom #define MAG_ONE 1.4142135623730950488016887242097 #pragma fragmentoption ARB_precision_hint_fastest #pragma multi_compile_fwdbase @@ -73,6 +74,7 @@ Shader "EVE/CloudVolumeParticle" { float _Opacity; float _InvFade; float _Rotation; + float _QuadSize; float _MaxScale; float4 _NoiseScale; float3 _MaxTrans; @@ -89,67 +91,115 @@ Shader "EVE/CloudVolumeParticle" { float2 texcoord : TEXCOORD0; }; - struct v2f { + struct v2g { float4 pos : SV_POSITION; fixed4 color : COLOR; - half4 viewDir : TEXCOORD0; - float2 texcoordZY : TEXCOORD1; - float2 texcoordXZ : TEXCOORD2; - float2 texcoordXY : TEXCOORD3; - float2 uv : TEXCOORD4; - float4 projPos : TEXCOORD5; - float3 planetPos : TEXCOORD6; - float3 viewDirT : TEXCOORD7; - float3 lightDirT : TEXCOORD8; + float3 hashVect : TEXCOORD0; + float4 localOrigin : TEXCOORD1; + float4 origin : TEXCOORD2; + float viewDirFade : TEXCOORD3; + float3 planetPos : TEXCOORD4; }; - v2f vert (appdata_t v) + //vertex function, called for every point on our hexSeg, each vertex corresponding to the origin of a particle/quad + v2g vert (appdata_t v) { - v2f o; - UNITY_INITIALIZE_OUTPUT(v2f, o); + v2g o; + UNITY_INITIALIZE_OUTPUT(v2g, o); - float4 origin = mul(unity_ObjectToWorld, float4(0,0,0,1)); + v.vertex.xyz/=v.vertex.w; + float4 origin = mul(unity_ObjectToWorld, v.vertex); //origin of the quad in worldSpace float4 planet_pos = mul(_PosRotation, origin); - + //these two operations we can make directly in one op by doing mul(_PosRotation, Object2World) on CPU + //still the vertex shader cost of this shader is negligible in front of the fragment shader so these things aren't really necessary float3 normalized = _NoiseScale.z*(planet_pos.xyz); - float3 hashVect = .5*(float3(snoise(normalized), snoise(_NoiseScale.x*normalized), snoise(_NoiseScale.y*normalized))+1); + float3 hashVect = .5*(float3(snoise(normalized), snoise(_NoiseScale.x*normalized), snoise(_NoiseScale.y*normalized))+1); //unique hash of the particle based on planet pos + + o.hashVect = hashVect; float4 localOrigin; - localOrigin.xyz = (2*hashVect-1)*_MaxTrans; + localOrigin.xyz = (2*hashVect-1)*_MaxTrans; //offset to localOrigin based on hash above localOrigin.w = 1; - float localScale = (hashVect.x*(_MaxScale - 1)) + 1; - origin = mul(unity_ObjectToWorld, localOrigin); + //localOrigin.xyz+=v.vertex.xyz; //here this is wrong, in the original shader, local origin is added to the quad in it's space and gets transformed with it'w own M matrix with no issues + //here as we add this to the space of the hex, transforming later with M matrix can cause additional rotation, we can add this in worldSpace instead - planet_pos = mul(_MainRotation, origin); - float3 detail_pos = mul(_DetailRotation, planet_pos).xyz; + origin.xyz+=localOrigin; //the particle transforms are originally oriented same as in world space, therefore we can do this offset directly in worldSpace in our case + o.origin = origin; + + localOrigin = mul (unity_WorldToObject, origin); //transform back to find the new localOrigin + o.localOrigin = localOrigin; + + planet_pos = mul(_MainRotation, origin); //new planet pos based on offset origin o.planetPos = planet_pos.xyz; + + float3 detail_pos = mul(_DetailRotation, planet_pos).xyz; o.color = VERT_GET_NO_LOD_CUBE_MAP_1(_MainTex, planet_pos.xyz); - o.color.rgba *= GetCubeDetailMapNoLOD(_DetailTex, detail_pos, _DetailScale); - o.viewDir.w = GetDistanceFade(distance(origin, _WorldSpaceCameraPos), _DistFade, _DistFadeVert); - o.color.a *= o.viewDir.w; - - float4x4 M = rand_rotation( - (float3(frac(_Rotation),0,0))+hashVect, - localScale, - localOrigin.xyz); - float4x4 mvMatrix = mul(mul(UNITY_MATRIX_V, unity_ObjectToWorld), M); + o.viewDirFade = GetDistanceFade(distance(origin, _WorldSpaceCameraPos), _DistFade, _DistFadeVert); + o.color.a *= o.viewDirFade; + + float4 mvCenter = mul(UNITY_MATRIX_MV, float4(localOrigin.xyz,1.0)); //offset quad origin in viewspace + o.pos=mvCenter; + o.pos = o.color.a > (1.0/255.0) ? o.pos : float4(2.0, 2.0, 2.0, 1.0); //cull vertex if low alpha, pos outside clipspace - float3 viewDir = normalize(mvMatrix[2].xyz); - o.viewDir.xyz = abs(viewDir).xyz; + return o; + } - float4 mvCenter = mul(UNITY_MATRIX_MV, localOrigin); - - o.pos = mul(UNITY_MATRIX_P,mvCenter+ float4(v.vertex.xyz*localScale,v.vertex.w)); - o.pos = o.color.a > (1.0/255.0) ? o.pos : float4(2.0, 2.0, 2.0, 1.0); //cull vertex if low alpha, pos outside clipspace - - float2 texcoodOffsetxy = ((2*v.texcoord)- 1); - float4 texcoordOffset = float4(texcoodOffsetxy.x, texcoodOffsetxy.y, 0, v.vertex.w); + struct g2f + { + float4 pos : SV_POSITION; + fixed4 color : COLOR; + half4 viewDir : TEXCOORD0; + float2 texcoordZY : TEXCOORD1; + float2 texcoordXZ : TEXCOORD2; + float2 texcoordXY : TEXCOORD3; + float2 uv : TEXCOORD4; + float4 projPos : TEXCOORD5; + float3 planetPos : TEXCOORD6; + float3 viewDirT : TEXCOORD7; + float3 lightDirT : TEXCOORD8; + float4 localOrigin : TEXCOORD9; + }; + + //this function builds a quad corner vertex from the data passed to it, it will be called by the geometry shader + g2f buildQuadVertex(v2g originPoint, float3 vertexPosition, float2 vertexUV, float3 viewDir, float4x4 mvMatrix, float localScale) + { + g2f tri; + UNITY_INITIALIZE_OUTPUT(g2f, tri); + + float3 mvCenter = originPoint.pos.xyz/originPoint.pos.w; + tri.pos = float4(mvCenter + _QuadSize * localScale * vertexPosition,1.0); //position in view space of quad corner + +#ifdef SOFT_DEPTH_ON + float eyedepth = -tri.pos.z; +#endif + + tri.pos = mul (UNITY_MATRIX_P, tri.pos); + +#ifdef SOFT_DEPTH_ON + tri.projPos = ComputeScreenPos (tri.pos); + //COMPUTE_EYEDEPTH(tri.projPos.z); + + //we replace COMPUTE_EYEDEPTH with it's definition as it's only designed for the vertex shader input + //tri.projPos.z = -UnityObjectToViewPos( v.vertex ).z + tri.projPos.z = eyedepth; +#endif + + + + //pass these values we need for the fragment shader + tri.viewDir.xyz = abs(viewDir).xyz; + tri.viewDir.w = originPoint.viewDirFade; + tri.planetPos = originPoint.planetPos; + tri.color = originPoint.color; + + float2 texcoodOffsetxy = ((2*vertexUV)- 1); + float4 texcoordOffset = float4(texcoodOffsetxy.x, texcoodOffsetxy.y, 0, 1.0); //would 1.0 work here???? let's find out float4 ZYv = texcoordOffset.zyxw; float4 XZv = texcoordOffset.xzyw; @@ -158,7 +208,7 @@ Shader "EVE/CloudVolumeParticle" { ZYv.z*=sign(-viewDir.x); XZv.x*=sign(-viewDir.y); XYv.x*=sign(viewDir.z); - + ZYv.x += sign(-viewDir.x)*sign(ZYv.z)*(viewDir.z); XZv.y += sign(-viewDir.y)*sign(XZv.x)*(viewDir.x); XYv.z += sign(-viewDir.z)*sign(XYv.x)*(viewDir.x); @@ -171,35 +221,66 @@ Shader "EVE/CloudVolumeParticle" { float2 XZ = mul(mvMatrix, XZv).xy - mvCenter.xy; float2 XY = mul(mvMatrix, XYv).xy - mvCenter.xy; - o.texcoordZY = half2(.5 ,.5) + .6*(ZY); - o.texcoordXZ = half2(.5 ,.5) + .6*(XZ); - o.texcoordXY = half2(.5 ,.5) + .6*(XY); - + tri.texcoordZY = half2(.5 ,.5) + .6*(ZY); + tri.texcoordXZ = half2(.5 ,.5) + .6*(XZ); + tri.texcoordXY = half2(.5 ,.5) + .6*(XY); - float3 worldNormal = normalize(mul( unity_ObjectToWorld, float4( v.normal, 0.0 ) ).xyz); - viewDir = normalize(origin - _WorldSpaceCameraPos); - //o.color.rgb *= MultiBodyShadow(origin, _SunRadius, _SunPos, _ShadowBodies); - //o.color.rgb *= Terminator(_WorldSpaceLightPos0, worldNormal); + viewDir = normalize(originPoint.origin - _WorldSpaceCameraPos); //worldSpaceView dir to center of quad not to fragment, why? maybe to frag would be better? - -#ifdef SOFT_DEPTH_ON - o.projPos = ComputeScreenPos (o.pos); - COMPUTE_EYEDEPTH(o.projPos.z); -#endif - //WorldSpaceViewDir(origin).xyz half3 normal = normalize(-viewDir); float3 tangent = UNITY_MATRIX_V[0].xyz; float3 binormal = -cross(normal, normalize(tangent)); float3x3 rotation = float3x3(tangent.xyz, binormal, normal); - o.lightDirT = normalize(mul(rotation, _WorldSpaceLightPos0.xyz)); - o.viewDirT = normalize(mul(rotation, viewDir)); + tri.lightDirT = normalize(mul(rotation, _WorldSpaceLightPos0.xyz)); + tri.viewDirT = normalize(mul(rotation, viewDir)); - o.uv = v.texcoord; - return o; + tri.uv = vertexUV; //quad UV + tri.localOrigin = originPoint.localOrigin; + + return tri; } - fixed4 frag (v2f IN) : COLOR + //geometry shader + //for every vertex from the vertex shader it will create a particle quad of 4 vertexes and 2 triangles + [maxvertexcount(4)] + void geom(point v2g input[1], inout TriangleStream outStream) + { + g2f tri; + + //if alpha is alread zero discard the quad to save on geometry and fragment shaders + if (input[0].color.a > 0.0) + { + //common values for all the quad + float localScale = (input[0].hashVect.x*(_MaxScale - 1)) + 1; + + float4x4 M = rand_rotation( + (float3(frac(_Rotation),0,0))+input[0].hashVect, + localScale, + input[0].localOrigin.xyz/input[0].localOrigin.w); + + float4x4 mvMatrix = mul(mul(UNITY_MATRIX_V, unity_ObjectToWorld), M); + float3 viewDir = normalize(mvMatrix[2].xyz); //cameraSpace viewDir I think + + //build our quad + tri = buildQuadVertex(input[0],float3(-0.5,-0.5,0.0),float2(0.0,0.0),viewDir,mvMatrix,localScale); + outStream.Append(tri); + + tri = buildQuadVertex(input[0],float3(-0.5,0.5,0.0),float2(0.0,1.0),viewDir,mvMatrix,localScale); + outStream.Append(tri); + + tri = buildQuadVertex(input[0],float3(0.5,-0.5,0.0),float2(1.0,0.0),viewDir,mvMatrix,localScale); + outStream.Append(tri); + + tri = buildQuadVertex(input[0],float3(0.5,0.5,0.0),float2(1.0,1.0),viewDir,mvMatrix,localScale); + outStream.Append(tri); + + } + + outStream.RestartStrip(); + } + + float4 frag (g2f IN) : COLOR { half4 tex; @@ -220,6 +301,9 @@ Shader "EVE/CloudVolumeParticle" { color *= _Color * IN.color; + color.a *= tex.a; + tex.a = IN.viewDir.w*tex.a; + //half3 normT = UnpackNormal(tex2D(_BumpMap, IN.uv)); half3 normT; @@ -231,8 +315,7 @@ Shader "EVE/CloudVolumeParticle" { //color.rg = IN.uv; - color.a *= tex.a; - tex.a = IN.viewDir.w*tex.a; + color.rgb *= ScatterColorLight(IN.lightDirT, IN.viewDirT, normT, tex, _MinScatter, _Opacity, 1).rgb; #ifdef SOFT_DEPTH_ON diff --git a/Atmosphere/CloudsVolume.cs b/Atmosphere/CloudsVolume.cs index 97440195..316cd473 100644 --- a/Atmosphere/CloudsVolume.cs +++ b/Atmosphere/CloudsVolume.cs @@ -24,6 +24,8 @@ public class particleVolumeMaterial : MaterialManager [ConfigItem] float _Opacity = 1.05f; + float _QuadSize; + public float QuadSize { set { _QuadSize = value; } } float _MaxScale; public float MaxScale { set { _MaxScale = value; } } Vector3 _MaxTrans; @@ -84,6 +86,7 @@ public bool enabled public void Apply(CloudsMaterial material, float radius, Transform parent) { Remove(); + particleMaterial.QuadSize = size.x; particleMaterial.MaxScale = size.y; particleMaterial.MaxTrans = maxTranslation; particleMaterial.NoiseScale = new Vector3(noiseScale.x, noiseScale.y, noiseScale.z / radius); diff --git a/Atmosphere/VolumeSection.cs b/Atmosphere/VolumeSection.cs index 8dc1ef36..53fe1088 100644 --- a/Atmosphere/VolumeSection.cs +++ b/Atmosphere/VolumeSection.cs @@ -54,6 +54,52 @@ internal void Destroy() } + //removes the need for individual particles/meshrenderers etc + //creates one mesh with all the particle positions which then gets passed to a geometry shader which then generates particle quads from the vertices + class CloudMesh + { + GameObject cloudMesh; + public CloudMesh(Material cloudParticleMaterial, Vector2 size, Transform parent, float magnitude, HexSeg hexGeometry) //size should be passed to material as a parameter, to control quad generation + { + cloudMesh = new GameObject(); + + cloudMesh.transform.parent = parent; + cloudMesh.transform.localPosition = Vector3.zero; + + //Vector3 worldUp = cloudMesh.transform.position - parent.parent.position; + //cloudMesh.transform.up = worldUp.normalized; + + cloudMesh.transform.localRotation = Quaternion.Euler(0, 0, 0); + + cloudMesh.transform.localScale = Vector3.one; + + cloudMesh.layer = (int)Tools.Layer.Local; + + //Vector3 up = cloudMesh.transform.InverseTransformDirection(worldUp); + //Quad.Create(cloudMesh, (int)size.x, Color.white, up, size.y); + + MeshFilter filter = cloudMesh.AddComponent(); + filter.mesh = hexGeometry.BuildPointsMesh(); + filter.mesh.RecalculateBounds(); + + + //Debug.Log("vertices.Count() " + vertices.Count()); + + MeshRenderer mr = cloudMesh.AddComponent(); + mr.sharedMaterial = cloudParticleMaterial; + + mr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; + mr.receiveShadows = false; + mr.enabled = true; + } + + + internal void Destroy() + { + GameObject.DestroyImmediate(cloudMesh); + } + } + class VolumeSection { @@ -63,6 +109,8 @@ class VolumeSection float magnitude; float xComp, zComp; List Particles = new List(); + CloudMesh cloudMesh; + float radius, divisions; public Vector3 Center { get { return segment.transform.localPosition; } } @@ -81,11 +129,7 @@ public VolumeSection(Material cloudParticleMaterial, Vector2 size, Transform par segment.transform.localPosition = pos; Reassign(pos, magnitude, parent); - List positions = hexGeometry.GetPoints(); - foreach (Vector3 position in positions) - { - Particles.Add(new CloudParticle(cloudParticleMaterial, size, segment.transform, position, magnitude)); - } + cloudMesh = new CloudMesh(cloudParticleMaterial, size, segment.transform, magnitude, hexGeometry); } public void Reassign(Vector3 pos, float magnitude = -1, Transform parent = null) diff --git a/ShaderLoader/ShaderLoader.cs b/ShaderLoader/ShaderLoader.cs index 1343c290..8bc3960c 100644 --- a/ShaderLoader/ShaderLoader.cs +++ b/ShaderLoader/ShaderLoader.cs @@ -6,7 +6,7 @@ using System.Text; using UnityEngine; using Utils; -using KSPAssets.Loaders; +using KSPAssets; namespace ShaderLoader { diff --git a/Utils/HexSeg.cs b/Utils/HexSeg.cs index d6dae8d6..5da7a178 100644 --- a/Utils/HexSeg.cs +++ b/Utils/HexSeg.cs @@ -70,6 +70,28 @@ internal void AppendPoints(List pointList) } } } + + internal void AppendTrianglesAndPoints(List indiceList, List pointList) + { + if (Subs != null) + { + foreach (Triangle sub in Subs) + { + sub.AppendTrianglesAndPoints(indiceList,pointList); + } + } + else //we are at the lowest subdivision level + { + foreach (Vector3 point in Points) + { + if (!pointList.Contains(point)) + { + pointList.Add(point); + } + indiceList.Add(pointList.IndexOf(point)); + } + } + } } public class HexSeg @@ -114,5 +136,40 @@ public List GetPoints() } return pointList; } + + public Mesh BuildMesh() + { + List pointList = new List(); + List indiceList = new List(); + + foreach (Triangle triangle in Triangles) + { + triangle.AppendTrianglesAndPoints(indiceList, pointList); + } + + Mesh hexSegMesh = new Mesh(); + hexSegMesh.vertices = pointList.ToArray(); + hexSegMesh.triangles = indiceList.ToArray(); + + return hexSegMesh; + } + + public Mesh BuildPointsMesh() + { + List pointList = GetPoints(); + + int[] indices = new int[pointList.Count]; + + for (int i = 0; i < indices.Length; i++) + { + indices[i] = i; + } + + Mesh hexSegMesh = new Mesh(); + hexSegMesh.SetVertices(pointList); + hexSegMesh.SetIndices(indices, MeshTopology.Points, 0); + + return hexSegMesh; + } } } From d639b712f35fe3b60e3843151435ee51ad023d43 Mon Sep 17 00:00:00 2001 From: lghassen Date: Thu, 6 Aug 2020 18:09:00 +0200 Subject: [PATCH 02/26] fix SM 4.0 shader not loading in KSP --- Assets/Shaders/CloudVolumeParticle.shader | 2 -- 1 file changed, 2 deletions(-) diff --git a/Assets/Shaders/CloudVolumeParticle.shader b/Assets/Shaders/CloudVolumeParticle.shader index d8d48eb2..07e3d71d 100644 --- a/Assets/Shaders/CloudVolumeParticle.shader +++ b/Assets/Shaders/CloudVolumeParticle.shader @@ -40,8 +40,6 @@ CGPROGRAM #include "EVEUtils.cginc" - #pragma target 4.0 - #pragma glsl #pragma vertex vert #pragma fragment frag #pragma geometry geom From 87e1420982fba3f3d807ae4d687cfd16291c06d2 Mon Sep 17 00:00:00 2001 From: lghassen Date: Thu, 6 Aug 2020 18:09:43 +0200 Subject: [PATCH 03/26] fix shader formatting and redundant alpha check in geom shader --- Assets/Shaders/CloudVolumeParticle.shader | 44 +++++++++++------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/Assets/Shaders/CloudVolumeParticle.shader b/Assets/Shaders/CloudVolumeParticle.shader index 07e3d71d..0569fb8c 100644 --- a/Assets/Shaders/CloudVolumeParticle.shader +++ b/Assets/Shaders/CloudVolumeParticle.shader @@ -118,19 +118,19 @@ o.hashVect = hashVect; float4 localOrigin; - localOrigin.xyz = (2*hashVect-1)*_MaxTrans; //offset to localOrigin based on hash above + localOrigin.xyz = (2*hashVect-1)*_MaxTrans; //offset to localOrigin based on hash above localOrigin.w = 1; - //localOrigin.xyz+=v.vertex.xyz; //here this is wrong, in the original shader, local origin is added to the quad in it's space and gets transformed with it'w own M matrix with no issues - //here as we add this to the space of the hex, transforming later with M matrix can cause additional rotation, we can add this in worldSpace instead + //localOrigin.xyz+=v.vertex.xyz; //here this is wrong, in the original shader, local origin is added to the quad in it's space and gets transformed with it'w own M matrix with no issues + //here as we add this to the space of the hex, transforming later with M matrix can cause additional rotation, we can add this in worldSpace instead - origin.xyz+=localOrigin; //the particle transforms are originally oriented same as in world space, therefore we can do this offset directly in worldSpace in our case + origin.xyz+=localOrigin; //the particle transforms are originally oriented same as in world space, therefore we can do this offset directly in worldSpace in our case o.origin = origin; localOrigin = mul (unity_WorldToObject, origin); //transform back to find the new localOrigin o.localOrigin = localOrigin; - planet_pos = mul(_MainRotation, origin); //new planet pos based on offset origin + planet_pos = mul(_MainRotation, origin); //new planet pos based on offset origin o.planetPos = planet_pos.xyz; float3 detail_pos = mul(_DetailRotation, planet_pos).xyz; @@ -246,34 +246,30 @@ { g2f tri; - //if alpha is alread zero discard the quad to save on geometry and fragment shaders - if (input[0].color.a > 0.0) - { - //common values for all the quad - float localScale = (input[0].hashVect.x*(_MaxScale - 1)) + 1; - float4x4 M = rand_rotation( + //common values for all the quad + float localScale = (input[0].hashVect.x*(_MaxScale - 1)) + 1; + + float4x4 M = rand_rotation( (float3(frac(_Rotation),0,0))+input[0].hashVect, localScale, input[0].localOrigin.xyz/input[0].localOrigin.w); - float4x4 mvMatrix = mul(mul(UNITY_MATRIX_V, unity_ObjectToWorld), M); - float3 viewDir = normalize(mvMatrix[2].xyz); //cameraSpace viewDir I think - - //build our quad - tri = buildQuadVertex(input[0],float3(-0.5,-0.5,0.0),float2(0.0,0.0),viewDir,mvMatrix,localScale); - outStream.Append(tri); + float4x4 mvMatrix = mul(mul(UNITY_MATRIX_V, unity_ObjectToWorld), M); + float3 viewDir = normalize(mvMatrix[2].xyz); //cameraSpace viewDir I think - tri = buildQuadVertex(input[0],float3(-0.5,0.5,0.0),float2(0.0,1.0),viewDir,mvMatrix,localScale); - outStream.Append(tri); + //build our quad + tri = buildQuadVertex(input[0],float3(-0.5,-0.5,0.0),float2(0.0,0.0),viewDir,mvMatrix,localScale); + outStream.Append(tri); - tri = buildQuadVertex(input[0],float3(0.5,-0.5,0.0),float2(1.0,0.0),viewDir,mvMatrix,localScale); - outStream.Append(tri); + tri = buildQuadVertex(input[0],float3(-0.5,0.5,0.0),float2(0.0,1.0),viewDir,mvMatrix,localScale); + outStream.Append(tri); - tri = buildQuadVertex(input[0],float3(0.5,0.5,0.0),float2(1.0,1.0),viewDir,mvMatrix,localScale); - outStream.Append(tri); + tri = buildQuadVertex(input[0],float3(0.5,-0.5,0.0),float2(1.0,0.0),viewDir,mvMatrix,localScale); + outStream.Append(tri); - } + tri = buildQuadVertex(input[0],float3(0.5,0.5,0.0),float2(1.0,1.0),viewDir,mvMatrix,localScale); + outStream.Append(tri); outStream.RestartStrip(); } From 6cc5341fad1356fe0bc5ea491d309d2ee739305a Mon Sep 17 00:00:00 2001 From: lghassen Date: Thu, 6 Aug 2020 20:47:03 +0200 Subject: [PATCH 04/26] Rename particle shader for scatterer to know to replace new version --- Assets/Shaders/CloudVolumeParticle.shader | 8 +++++--- Atmosphere/CloudsVolume.cs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Assets/Shaders/CloudVolumeParticle.shader b/Assets/Shaders/CloudVolumeParticle.shader index 0569fb8c..1cfedd83 100644 --- a/Assets/Shaders/CloudVolumeParticle.shader +++ b/Assets/Shaders/CloudVolumeParticle.shader @@ -1,4 +1,8 @@ -Shader "EVE/CloudVolumeParticle" { +// Instead of having one draw call per particle quad like in original EVE +// Here we have a single draw call passing a points mesh to the GPU +// This shader then builds all the quads from the mesh using a geometry shader +// This saves a ton of draw calls +Shader "EVE/GeometryCloudVolumeParticle" { Properties { _Tex("Particle Texture", 2D) = "white" {} _MainTex("Main (RGB)", 2D) = "white" {} @@ -308,8 +312,6 @@ //normT.z = 1; //color.rg = IN.uv; - - color.rgb *= ScatterColorLight(IN.lightDirT, IN.viewDirT, normT, tex, _MinScatter, _Opacity, 1).rgb; #ifdef SOFT_DEPTH_ON diff --git a/Atmosphere/CloudsVolume.cs b/Atmosphere/CloudsVolume.cs index 316cd473..0e826f72 100644 --- a/Atmosphere/CloudsVolume.cs +++ b/Atmosphere/CloudsVolume.cs @@ -66,7 +66,7 @@ private static Shader ParticleCloudShader { if (particleCloudShader == null) { - particleCloudShader = ShaderLoaderClass.FindShader("EVE/CloudVolumeParticle"); + particleCloudShader = ShaderLoaderClass.FindShader("EVE/GeometryCloudVolumeParticle"); } return particleCloudShader; } } From 051f8dfcc6a6b2edad0d8e594c99b16d11d81506 Mon Sep 17 00:00:00 2001 From: lghassen Date: Sat, 8 Aug 2020 20:01:44 +0200 Subject: [PATCH 05/26] prototype depth-based cloud shadows (TODO: handle dual camera mode, fade out or fix depth artifacts) --- Assets/Shaders/ScreenSpaceCloudShadow.shader | 147 +++++++++++++++++++ Atmosphere/Atmosphere.csproj | 1 + Atmosphere/Clouds2D.cs | 79 +++++++--- Atmosphere/CloudsScreenSpaceShadow.cs | 41 ++++++ 4 files changed, 249 insertions(+), 19 deletions(-) create mode 100644 Assets/Shaders/ScreenSpaceCloudShadow.shader create mode 100644 Atmosphere/CloudsScreenSpaceShadow.cs diff --git a/Assets/Shaders/ScreenSpaceCloudShadow.shader b/Assets/Shaders/ScreenSpaceCloudShadow.shader new file mode 100644 index 00000000..350bb1b2 --- /dev/null +++ b/Assets/Shaders/ScreenSpaceCloudShadow.shader @@ -0,0 +1,147 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' +// Upgrade NOTE: replaced '_Projector' with 'unity_Projector' + +Shader "EVE/ScreenSpaceCloudShadow" { + Properties{ + _Color("Color Tint", Color) = (1,1,1,1) + _MainTex("Main (RGB)", 2D) = "white" {} + _DetailTex("Detail (RGB)", 2D) = "white" {} + _UVNoiseTex("UV Noise (RG)", 2D) = "black" {} + _DetailScale("Detail Scale", float) = 100 + _DetailDist("Detail Distance", Range(0,1)) = 0.00875 + _UVNoiseScale("UV Noise Scale", Range(0,0.1)) = 0.01 + _UVNoiseStrength("UV Noise Strength", Range(0,0.1)) = 0.002 + _UVNoiseAnimation("UV Noise Animation", Vector) = (0.002,0.001,0) + + _PlanetOrigin("Sphere Center", Vector) = (0,0,0,1) + _SunDir("Sunlight direction", Vector) = (0,0,0,1) + _Radius("Radius", Float) = 1 + _PlanetRadius("Planet Radius", Float) = 1 + _ShadowFactor("Shadow Factor", Float) = 1 + + _UniversalTime("Universal Time", Vector) = (0,0,0,0) + } + + SubShader{ + Tags{ "Queue" = "Geometry+500" "IgnoreProjector" = "True" "RenderType" = "Transparent" } + Pass { + Blend Zero SrcColor //multiplicative + //Blend SrcAlpha OneMinusSrcAlpha // Traditional transparency + ZWrite Off + Offset 0, 0 + CGPROGRAM + #include "EVEUtils.cginc" + #pragma target 3.0 + #pragma glsl + #pragma vertex vert + #pragma fragment frag +#pragma multi_compile MAP_TYPE_1 MAP_TYPE_CUBE_1 MAP_TYPE_CUBE2_1 MAP_TYPE_CUBE6_1 +#ifndef MAP_TYPE_CUBE2_1 +#pragma multi_compile ALPHAMAP_N_1 ALPHAMAP_1 +#endif + +#include "alphaMap.cginc" +#include "cubeMap.cginc" + + CUBEMAP_DEF_1(_MainTex) + + fixed4 _Color; + uniform sampler2D _DetailTex; + uniform sampler2D _UVNoiseTex; + fixed4 _DetailOffset; + float _DetailScale; + float _DetailDist; + float _UVNoiseScale; + float _UVNoiseStrength; + float2 _UVNoiseAnimation; + float4 _SunDir; + float _Radius; + float _PlanetRadius; + float _ShadowFactor; + + float3 _PlanetOrigin; + + uniform sampler2D _CameraDepthTexture; + float4x4 CameraToWorld; + + struct appdata_t { + float4 vertex : POSITION; + float3 normal : NORMAL; + }; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + v2f vert(appdata_t v) + { + v2f o; + v.vertex.y = v.vertex.y *_ProjectionParams.x; + o.pos = float4(v.vertex.xy, 1.0, 1.0); + o.uv = ComputeScreenPos(o.pos); + + return o; + } + + fixed4 frag(v2f IN) : COLOR + { + float zdepth = tex2Dlod(_CameraDepthTexture, float4(IN.uv,0,0)); + + +#ifdef SHADER_API_D3D11 //#if defined(UNITY_REVERSED_Z) + zdepth = 1 - zdepth; +#endif + + float4 clipPos = float4(IN.uv, zdepth, 1.0); + clipPos.xyz = 2.0f * clipPos.xyz - 1.0f; + float4 camPos = mul(unity_CameraInvProjection, clipPos); + + float4 worldPos = mul(CameraToWorld,camPos); + worldPos/=worldPos.w; + + float4 vertexPos = worldPos; + float3 worldOrigin = _PlanetOrigin; + + float3 L = worldOrigin - vertexPos.xyz; + float originDist = length(L); + float tc = dot(L,-_SunDir); + float ntc = dot(normalize(L), _SunDir); + float d = sqrt(dot(L,L) - (tc*tc)); + float d2 = pow(d,2); + float td = sqrt(dot(L,L) - d2); + float sphereRadius = _Radius; + float shadowCheck = step(originDist, sphereRadius)*saturate(ntc*100); + //saturate((step(d, sphereRadius)*step(0.0, tc))+ + //(step(originDist, sphereRadius))); + float tlc = sqrt((sphereRadius*sphereRadius) - d2); + float sphereDist = lerp(lerp(tlc - td, tc - tlc, step(0.0, tc)), + lerp(tlc - td, tc + tlc, step(0.0, tc)), step(originDist, sphereRadius)); + float4 planetPos = vertexPos + (-_SunDir*sphereDist); + planetPos = (mul(_MainRotation, planetPos)); + float3 mainPos = planetPos.xyz; + float3 detailPos = (mul(_DetailRotation, planetPos)).xyz; + + //Ocean filter //this thing kills the precision, stock ocean writes to dbuffer anyway + //shadowCheck *= saturate(.2*((originDist + 5) - _PlanetRadius)); + + half4 main = GET_CUBE_MAP_P(_MainTex, mainPos, _UVNoiseTex, _UVNoiseScale, _UVNoiseStrength, _UVNoiseAnimation); + main = ALPHA_COLOR_1(main); + + half4 detail = GetCubeDetailMap(_DetailTex, detailPos, _DetailScale); + + float viewDist = distance(worldPos.xyz,_WorldSpaceCameraPos); + half detailLevel = saturate(2 * _DetailDist*viewDist); + fixed4 color = _Color * main.rgba * lerp(detail.rgba, 1, detailLevel); + + color.rgb = saturate(color.rgb * (1- color.a)); + color.rgb = lerp(1, color.rgb, _ShadowFactor*color.a); + return lerp(1, color, shadowCheck); + } + + ENDCG + } + } +} \ No newline at end of file diff --git a/Atmosphere/Atmosphere.csproj b/Atmosphere/Atmosphere.csproj index 22b69cc5..92c42151 100644 --- a/Atmosphere/Atmosphere.csproj +++ b/Atmosphere/Atmosphere.csproj @@ -132,6 +132,7 @@ + diff --git a/Atmosphere/Clouds2D.cs b/Atmosphere/Clouds2D.cs index a1524512..16d0a6d9 100644 --- a/Atmosphere/Clouds2D.cs +++ b/Atmosphere/Clouds2D.cs @@ -46,7 +46,10 @@ class Clouds2D Projector ShadowProjector = null; GameObject ShadowProjectorGO = null; CloudsMaterial cloudsMat = null; - + + CloudsScreenSpaceShadow screenSpaceShadow; + GameObject screenSpaceShadowGO = null; + [ConfigItem] Clouds2DMaterial macroCloudMaterial = null; [ConfigItem, Optional] @@ -133,6 +136,19 @@ private static Shader CloudShadowShader } } + private static Shader screenSpaceCloudShadowShader = null; + private static Shader ScreenSpaceCloudShadowShader + { + get + { + if (screenSpaceCloudShadowShader == null) + { + screenSpaceCloudShadowShader = ShaderLoaderClass.FindShader("EVE/ScreenSpaceCloudShadow"); + } + return screenSpaceCloudShadowShader; + } + } + private bool _enabled = true; public bool enabled { get {return _enabled; } @@ -147,7 +163,12 @@ private static Shader CloudShadowShader { ShadowProjector.enabled = value; } - } } + if (screenSpaceShadowGO != null) + { + screenSpaceShadowGO.SetActive(value); + } + } + } internal void Apply(CelestialBody celestialBody, Transform scaledCelestialTransform, CloudsMaterial cloudsMaterial, string name, float radius, float arc, Tools.Layer layer = Tools.Layer.Scaled) { @@ -187,6 +208,14 @@ internal void Apply(CelestialBody celestialBody, Transform scaledCelestialTransf // Workaround Unity bug (Case 841236) ShadowProjector.enabled = false; ShadowProjector.enabled = true; + + // Here create the screenSpaceShadowMaterialStuff + screenSpaceShadowGO = new GameObject("EVE ScreenSpaceShadow"); + screenSpaceShadowGO.transform.parent = celestialBody.transform; + screenSpaceShadow = screenSpaceShadowGO.AddComponent(); //can this be a single class that will handle the mesh, and meshrenderer and everything? + screenSpaceShadow.material = new Material(ScreenSpaceCloudShadowShader); + shadowMaterial.ApplyMaterialProperties(screenSpaceShadow.material); + screenSpaceShadow.Init(); } @@ -261,22 +290,24 @@ public void Reassign(Tools.Layer layer, Transform parent, float worldScale) ShadowProjector.material.SetFloat("_PlanetRadius", (float)celestialBody.Radius*worldScale); ShadowProjector.transform.parent = parent; - ShadowProjectorGO.layer = (int)layer; - if (layer == Tools.Layer.Local) - { - ShadowProjector.ignoreLayers = ~(Tools.Layer.Default.Mask() | // Note: *NOT* TransparentFX, otherwise landing gear lights etc. look terrible. - Tools.Layer.Water.Mask() | - Tools.Layer.Local.Mask() | - Tools.Layer.Kerbals.Mask() | - Tools.Layer.Parts.Mask()); - ShadowProjector.material.EnableKeyword("WORLD_SPACE_ON"); - } - else + ShadowProjectorGO.layer = (int)Tools.Layer.Scaled; //move these to init since no longer need to change + if (layer == Tools.Layer.Scaled) { ShadowProjector.ignoreLayers = ~layer.Mask(); ShadowProjector.material.DisableKeyword("WORLD_SPACE_ON"); } - + + if (screenSpaceShadowGO != null) + { + macroCloudMaterial.ApplyMaterialProperties(screenSpaceShadow.material, worldScale); + cloudsMat.ApplyMaterialProperties(screenSpaceShadow.material, worldScale); + + screenSpaceShadow.material.SetFloat("_Radius", (float)radiusScaleLocal); + screenSpaceShadow.material.SetFloat("_PlanetRadius", (float)celestialBody.Radius * worldScale); + + screenSpaceShadowGO.SetActive(layer == Tools.Layer.Local); + + } } } @@ -298,6 +329,13 @@ public void Remove() ShadowProjector = null; ShadowProjectorGO = null; } + + if (screenSpaceShadowGO != null) + { + screenSpaceShadowGO.transform.parent = null; + GameObject.DestroyImmediate(screenSpaceShadowGO); + screenSpaceShadowGO = null; + } } internal void UpdateRotation(QuaternionD rotation, Matrix4x4 World2Planet, Matrix4x4 mainRotationMatrix, Matrix4x4 detailRotationMatrix) @@ -328,9 +366,9 @@ internal void UpdateRotation(QuaternionD rotation, Matrix4x4 World2Planet, Matri { ShadowProjector.material.SetVector(ShaderProperties.SUNDIR_PROPERTY, sunDirection); } - else + else if (screenSpaceShadowGO != null) { - ShadowProjector.material.SetVector(ShaderProperties.SUNDIR_PROPERTY, worldSunDir); + screenSpaceShadow.material.SetVector(ShaderProperties.SUNDIR_PROPERTY, worldSunDir); } } @@ -360,10 +398,13 @@ private void SetRotations(Matrix4x4 World2Planet, Matrix4x4 mainRotation, Matrix { ShadowProjector.material.SetMatrix(ShaderProperties.MAIN_ROTATION_PROPERTY, mainRotation); } - else + else if (screenSpaceShadowGO != null) { - ShadowProjector.material.SetMatrix(ShaderProperties.MAIN_ROTATION_PROPERTY, mainRotation * ShadowProjector.transform.parent.worldToLocalMatrix); - ShadowProjector.material.SetVector(ShaderProperties.PLANET_ORIGIN_PROPERTY, ShadowProjector.transform.parent.position); + screenSpaceShadow.material.SetMatrix(ShaderProperties.MAIN_ROTATION_PROPERTY, mainRotation * screenSpaceShadowGO.transform.parent.worldToLocalMatrix); + screenSpaceShadow.material.SetVector(ShaderProperties.PLANET_ORIGIN_PROPERTY, screenSpaceShadowGO.transform.parent.position); + + screenSpaceShadow.material.SetVector(ShaderProperties._UniveralTime_PROPERTY, UniversalTimeVector()); + screenSpaceShadow.material.SetMatrix(ShaderProperties.DETAIL_ROTATION_PROPERTY, detailRotation); } ShadowProjector.material.SetVector(ShaderProperties._UniveralTime_PROPERTY, UniversalTimeVector()); ShadowProjector.material.SetMatrix(ShaderProperties.DETAIL_ROTATION_PROPERTY, detailRotation); diff --git a/Atmosphere/CloudsScreenSpaceShadow.cs b/Atmosphere/CloudsScreenSpaceShadow.cs new file mode 100644 index 00000000..cf57432d --- /dev/null +++ b/Atmosphere/CloudsScreenSpaceShadow.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using ShaderLoader; +using UnityEngine; +using Utils; + +namespace Atmosphere +{ + class CloudsScreenSpaceShadow : MonoBehaviour + { + public Material material; + + public void Init() + { + Quad.Create(gameObject, 2, Color.white, Vector3.up, Mathf.Infinity); + + MeshRenderer shadowMR = gameObject.AddComponent(); + material.SetOverrideTag("IgnoreProjector", "True"); + shadowMR.sharedMaterial = material; + + shadowMR.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; + shadowMR.receiveShadows = false; + shadowMR.enabled = true; + + gameObject.layer = (int)Tools.Layer.Local; + + } + + void OnWillRenderObject() + { + if (material != null) + { + material.SetMatrix("CameraToWorld", Camera.current.cameraToWorldMatrix); + } + } + } +} From da463be52d192110aba1b609197067f42c1edd35 Mon Sep 17 00:00:00 2001 From: lghassen Date: Sat, 8 Aug 2020 23:45:31 +0200 Subject: [PATCH 06/26] fix Opengl, fade out clouds on Dx11 --- Assets/Shaders/ScreenSpaceCloudShadow.shader | 26 ++++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/Assets/Shaders/ScreenSpaceCloudShadow.shader b/Assets/Shaders/ScreenSpaceCloudShadow.shader index 350bb1b2..65de5dcb 100644 --- a/Assets/Shaders/ScreenSpaceCloudShadow.shader +++ b/Assets/Shaders/ScreenSpaceCloudShadow.shader @@ -28,7 +28,6 @@ Shader "EVE/ScreenSpaceCloudShadow" { Tags{ "Queue" = "Geometry+500" "IgnoreProjector" = "True" "RenderType" = "Transparent" } Pass { Blend Zero SrcColor //multiplicative - //Blend SrcAlpha OneMinusSrcAlpha // Traditional transparency ZWrite Off Offset 0, 0 CGPROGRAM @@ -79,8 +78,11 @@ Shader "EVE/ScreenSpaceCloudShadow" { v2f vert(appdata_t v) { v2f o; - v.vertex.y = v.vertex.y *_ProjectionParams.x; - o.pos = float4(v.vertex.xy, 1.0, 1.0); +#if defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE) + o.pos = float4(v.vertex.x, v.vertex.y *_ProjectionParams.x, -1.0 , 1.0); +#else + o.pos = float4(v.vertex.x, v.vertex.y *_ProjectionParams.x, 1.0 , 1.0); +#endif o.uv = ComputeScreenPos(o.pos); return o; @@ -117,15 +119,14 @@ Shader "EVE/ScreenSpaceCloudShadow" { //saturate((step(d, sphereRadius)*step(0.0, tc))+ //(step(originDist, sphereRadius))); float tlc = sqrt((sphereRadius*sphereRadius) - d2); + float sphereDist = lerp(lerp(tlc - td, tc - tlc, step(0.0, tc)), lerp(tlc - td, tc + tlc, step(0.0, tc)), step(originDist, sphereRadius)); + float4 planetPos = vertexPos + (-_SunDir*sphereDist); planetPos = (mul(_MainRotation, planetPos)); float3 mainPos = planetPos.xyz; - float3 detailPos = (mul(_DetailRotation, planetPos)).xyz; - - //Ocean filter //this thing kills the precision, stock ocean writes to dbuffer anyway - //shadowCheck *= saturate(.2*((originDist + 5) - _PlanetRadius)); + float3 detailPos = (mul(_DetailRotation, planetPos)).xyz; half4 main = GET_CUBE_MAP_P(_MainTex, mainPos, _UVNoiseTex, _UVNoiseScale, _UVNoiseStrength, _UVNoiseAnimation); main = ALPHA_COLOR_1(main); @@ -138,7 +139,16 @@ Shader "EVE/ScreenSpaceCloudShadow" { color.rgb = saturate(color.rgb * (1- color.a)); color.rgb = lerp(1, color.rgb, _ShadowFactor*color.a); - return lerp(1, color, shadowCheck); + + float fadeout = 1.0; +#ifdef SHADER_API_D3D11 + float camDistance = length(camPos.xyz/camPos.w); + fadeout = 1.0 - smoothstep (40000.0, 60000.0, camDistance); //fade out the shadows to hide artifacts from insufficient depth precision in dx11 +#else + fadeout = (zdepth == 1.0) ? 0.0 : 1.0; //don't render anything at or near clipping planes on ogl since we have 2 cameras +#endif + + return lerp(1, color, shadowCheck*fadeout); } ENDCG From 88e82284988d8cfc472dde759aa735b85437d45e Mon Sep 17 00:00:00 2001 From: lghassen Date: Thu, 13 Aug 2020 20:37:41 +0200 Subject: [PATCH 07/26] prototyope screen space celestial shadows --- .../ScreenSpaceSpherePlanetLighting.shader | 113 ++++++++++++++++++ Atmosphere/Atmosphere.csproj | 1 - Atmosphere/Clouds2D.cs | 4 +- CelestialShadows/ShadowManager.cs | 2 +- CelestialShadows/ShadowObject.cs | 55 +++++---- .../ScreenSpaceShadow.cs | 6 +- Utils/Utils.csproj | 1 + 7 files changed, 154 insertions(+), 28 deletions(-) create mode 100644 Assets/Shaders/ScreenSpaceSpherePlanetLighting.shader rename Atmosphere/CloudsScreenSpaceShadow.cs => Utils/ScreenSpaceShadow.cs (90%) diff --git a/Assets/Shaders/ScreenSpaceSpherePlanetLighting.shader b/Assets/Shaders/ScreenSpaceSpherePlanetLighting.shader new file mode 100644 index 00000000..a4a9a5cf --- /dev/null +++ b/Assets/Shaders/ScreenSpaceSpherePlanetLighting.shader @@ -0,0 +1,113 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' + +Shader "EVE/ScreenSpacePlanetLight" { + Properties{ + _Color("Color Tint", Color) = (1,1,1,1) + _SpecularColor("Specular tint", Color) = (1,1,1,1) + _SpecularPower("Shininess", Float) = 0.078125 + _PlanetOpacity("PlanetOpacity", Float) = 1 + _SunPos("_SunPos", Vector) = (0,0,0) + _SunRadius("_SunRadius", Float) = 1 + _bPos("_bPos", Vector) = (0,0,0) + _bRadius("_bRadius", Float) = 1 + } + Category{ + Lighting On + ZWrite Off + Cull Back + Offset 0, 0 + //Blend SrcAlpha OneMinusSrcAlpha + Blend Zero SrcColor //multiplicative + Tags{ + "Queue" = "Geometry+2" + "RenderMode" = "Transparent" + "IgnoreProjector" = "True" + } + SubShader{ + Pass{ + + Lighting On + Tags{ "LightMode" = "ForwardBase" } + + CGPROGRAM + + #include "EVEUtils.cginc" + #pragma target 3.0 + #pragma glsl + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_fwdbase + #pragma multi_compile MAP_TYPE_1 MAP_TYPE_CUBE_1 MAP_TYPE_CUBE2_1 MAP_TYPE_CUBE6_1 + + fixed4 _Color; + float _SpecularPower; + half4 _SpecularColor; + + uniform sampler2D _CameraDepthTexture; + float4x4 CameraToWorld; + + struct appdata_t { + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + }; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + v2f vert(appdata_t v) + { + v2f o; +#if defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE) + o.pos = float4(v.vertex.x, v.vertex.y *_ProjectionParams.x, -1.0 , 1.0); +#else + o.pos = float4(v.vertex.x, v.vertex.y *_ProjectionParams.x, 1.0 , 1.0); +#endif + o.uv = ComputeScreenPos(o.pos); + + return o; + } + + + fixed4 frag(v2f IN) : COLOR + { + half4 color = half4(1.0,1.0,1.0,1.0); + + float zdepth = tex2Dlod(_CameraDepthTexture, float4(IN.uv,0,0)); + + +#ifdef SHADER_API_D3D11 //#if defined(UNITY_REVERSED_Z) + zdepth = 1 - zdepth; +#endif + + float4 clipPos = float4(IN.uv, zdepth, 1.0); + clipPos.xyz = 2.0f * clipPos.xyz - 1.0f; + float4 camPos = mul(unity_CameraInvProjection, clipPos); + + float4 worldPos = mul(CameraToWorld,camPos); + worldPos/=worldPos.w; + + color.rgb = MultiBodyShadow(worldPos.xyz, _SunRadius, _SunPos, _ShadowBodies); + + +#ifdef SHADER_API_D3D11 + float fadeout = 1.0; +#else + float fadeout = (zdepth == 1.0) ? 0.0 : 1.0; //don't render anything at or near clipping planes on ogl since we have 2 cameras +#endif + + color.rgb = lerp(1.0,color.rgb,fadeout); + + return color; + } + ENDCG + + } + } + } +} \ No newline at end of file diff --git a/Atmosphere/Atmosphere.csproj b/Atmosphere/Atmosphere.csproj index 92c42151..22b69cc5 100644 --- a/Atmosphere/Atmosphere.csproj +++ b/Atmosphere/Atmosphere.csproj @@ -132,7 +132,6 @@ - diff --git a/Atmosphere/Clouds2D.cs b/Atmosphere/Clouds2D.cs index 16d0a6d9..94eb509d 100644 --- a/Atmosphere/Clouds2D.cs +++ b/Atmosphere/Clouds2D.cs @@ -47,7 +47,7 @@ class Clouds2D GameObject ShadowProjectorGO = null; CloudsMaterial cloudsMat = null; - CloudsScreenSpaceShadow screenSpaceShadow; + ScreenSpaceShadow screenSpaceShadow; GameObject screenSpaceShadowGO = null; [ConfigItem] @@ -212,7 +212,7 @@ internal void Apply(CelestialBody celestialBody, Transform scaledCelestialTransf // Here create the screenSpaceShadowMaterialStuff screenSpaceShadowGO = new GameObject("EVE ScreenSpaceShadow"); screenSpaceShadowGO.transform.parent = celestialBody.transform; - screenSpaceShadow = screenSpaceShadowGO.AddComponent(); //can this be a single class that will handle the mesh, and meshrenderer and everything? + screenSpaceShadow = screenSpaceShadowGO.AddComponent(); //can this be a single class that will handle the mesh, and meshrenderer and everything? screenSpaceShadow.material = new Material(ScreenSpaceCloudShadowShader); shadowMaterial.ApplyMaterialProperties(screenSpaceShadow.material); screenSpaceShadow.Init(); diff --git a/CelestialShadows/ShadowManager.cs b/CelestialShadows/ShadowManager.cs index bdd9456f..c942f35e 100644 --- a/CelestialShadows/ShadowManager.cs +++ b/CelestialShadows/ShadowManager.cs @@ -17,7 +17,7 @@ public class ShadowManager : GenericEVEManager public override ObjectType objectType { get { return ObjectType.BODY; } } public override String configName { get { return "EVE_SHADOWS"; } } public override int LoadOrder { get { return 200; } } - protected static ShadowProjector shadowProjector = null; + //protected static ShadowProjector shadowProjector = null; public override void Setup() { diff --git a/CelestialShadows/ShadowObject.cs b/CelestialShadows/ShadowObject.cs index aecda3c9..cfa59aec 100644 --- a/CelestialShadows/ShadowObject.cs +++ b/CelestialShadows/ShadowObject.cs @@ -64,17 +64,19 @@ public class LocalShadowComponent : MonoBehaviour CelestialBody body; List shadowList; public String GUID { get { return shadowMat.name; } } + GameObject screenSpaceShadowGO; - internal void Apply(Material mat, CelestialBody cb, List list) + internal void Apply(Material mat, CelestialBody cb, List list, GameObject go) { shadowMat = mat; body = cb; shadowList = list; + screenSpaceShadowGO = go; } internal void OnPreCull() { - if (HighLogic.LoadedScene != GameScenes.MAINMENU) + if (HighLogic.LoadedScene != GameScenes.MAINMENU && screenSpaceShadowGO != null && body.pqsController != null) { Matrix4x4 bodies = new Matrix4x4(); int i = 0; @@ -92,16 +94,7 @@ internal void OnPreCull() shadowMat.SetMatrix(ShaderProperties._ShadowBodies_PROPERTY, bodies); } - foreach (Transform child in body.transform) - { - Renderer cr = child.GetComponent(); - if (cr != null) - { - cr.sharedMaterial.SetFloat(ShaderProperties._SunRadius_PROPERTY, (float)(Sun.Instance.sun.Radius)); - cr.sharedMaterial.SetVector(ShaderProperties._SunPos_PROPERTY, Sun.Instance.sun.transform.position); - cr.sharedMaterial.SetMatrix(ShaderProperties._ShadowBodies_PROPERTY, bodies); - } - } + screenSpaceShadowGO.SetActive(body.pqsController.isActive); } } } @@ -128,8 +121,9 @@ public class ShadowObject : IEVEObject String materialName = Guid.NewGuid().ToString(); Material shadowMat; - MaterialPQS materialPQS; Material localShadowMat; + ScreenSpaceShadow screenSpaceShadow; + GameObject screenSpaceShadowGO = null; private static Shader shadowShader; private static Shader ShadowShader @@ -144,6 +138,19 @@ private static Shader ShadowShader } } + private static Shader screenSpaceShadowShader; + private static Shader ScreenSpaceShadowShader + { + get + { + if (screenSpaceShadowShader == null) + { + screenSpaceShadowShader = ShaderLoaderClass.FindShader("EVE/ScreenSpacePlanetLight"); + } + return screenSpaceShadowShader; + } + } + public void LoadConfigNode(ConfigNode node) { @@ -164,17 +171,25 @@ public void Apply() shadowMat = new Material(ShadowShader); GameObject go = new GameObject(); go.name = "EVE Shadows"; - materialPQS = go.AddComponent(); - localShadowMat = materialPQS.Apply(celestialBody, null, ShadowShader, false, true); - //shadowMaterial.ApplyMaterialProperties(shadowMat); + localShadowMat = new Material(ScreenSpaceShadowShader); + + screenSpaceShadowGO = new GameObject("EVE Celestial ScreenSpaceShadow"); + screenSpaceShadowGO.transform.parent = celestialBody.transform; + screenSpaceShadow = screenSpaceShadowGO.AddComponent(); + screenSpaceShadow.material = localShadowMat; + screenSpaceShadow.Init(); + screenSpaceShadowGO.SetActive(false); + shadowMat.SetFloat(ShaderProperties._SunRadius_PROPERTY, (float)(ScaledSpace.InverseScaleFactor * Sun.Instance.sun.Radius)); localShadowMat.SetFloat(ShaderProperties._SunRadius_PROPERTY, (float)(Sun.Instance.sun.Radius)); shadowMat.name = materialName; - localShadowMat.name = materialName; shadowMat.renderQueue = (int)Tools.Queue.Geometry + 3; + + localShadowMat.name = materialName; localShadowMat.renderQueue = (int)Tools.Queue.Geometry + 3; + DeferredRenderer.Add(mr.gameObject, shadowMat); } @@ -190,7 +205,7 @@ public void Apply() } } sc.Apply(shadowMat, celestialBody, casters); - lsc.Apply(localShadowMat, celestialBody, casters); + lsc.Apply(localShadowMat, celestialBody, casters, screenSpaceShadowGO); } ApplyToMainMenu(); @@ -248,8 +263,8 @@ public void Remove() DeferredRenderer.Remove(transform.gameObject, shadowMat); } - materialPQS.Remove(); - GameObject.DestroyImmediate(materialPQS); + + GameObject.DestroyImmediate(screenSpaceShadowGO); GameEvents.onGameSceneLoadRequested.Remove(SceneLoaded); } } diff --git a/Atmosphere/CloudsScreenSpaceShadow.cs b/Utils/ScreenSpaceShadow.cs similarity index 90% rename from Atmosphere/CloudsScreenSpaceShadow.cs rename to Utils/ScreenSpaceShadow.cs index cf57432d..23955eeb 100644 --- a/Atmosphere/CloudsScreenSpaceShadow.cs +++ b/Utils/ScreenSpaceShadow.cs @@ -4,13 +4,11 @@ using System.Linq; using System.Reflection; using System.Text; -using ShaderLoader; using UnityEngine; -using Utils; -namespace Atmosphere +namespace Utils { - class CloudsScreenSpaceShadow : MonoBehaviour + public class ScreenSpaceShadow : MonoBehaviour { public Material material; diff --git a/Utils/Utils.csproj b/Utils/Utils.csproj index e6291d91..c7db10f0 100644 --- a/Utils/Utils.csproj +++ b/Utils/Utils.csproj @@ -137,6 +137,7 @@ Properties\AssemblyVersionInfo.cs + From 95272e3ede9c94f283503d65a6d1bcacb839c54b Mon Sep 17 00:00:00 2001 From: lghassen Date: Fri, 14 Aug 2020 23:48:01 +0200 Subject: [PATCH 08/26] fix incorrect fadeout --- Assets/Shaders/ScreenSpaceSpherePlanetLighting.shader | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Assets/Shaders/ScreenSpaceSpherePlanetLighting.shader b/Assets/Shaders/ScreenSpaceSpherePlanetLighting.shader index a4a9a5cf..e982373c 100644 --- a/Assets/Shaders/ScreenSpaceSpherePlanetLighting.shader +++ b/Assets/Shaders/ScreenSpaceSpherePlanetLighting.shader @@ -95,11 +95,7 @@ Shader "EVE/ScreenSpacePlanetLight" { color.rgb = MultiBodyShadow(worldPos.xyz, _SunRadius, _SunPos, _ShadowBodies); -#ifdef SHADER_API_D3D11 - float fadeout = 1.0; -#else - float fadeout = (zdepth == 1.0) ? 0.0 : 1.0; //don't render anything at or near clipping planes on ogl since we have 2 cameras -#endif + float fadeout = (zdepth == 1.0) ? 0.0 : 1.0; //don't render anything at or near clipping planes color.rgb = lerp(1.0,color.rgb,fadeout); From 324e34a815e60971d9e6c06adb64f11baa1a868a Mon Sep 17 00:00:00 2001 From: lghassen Date: Sat, 15 Aug 2020 18:48:36 +0200 Subject: [PATCH 09/26] fix cloud shadows always rendering --- Atmosphere/Clouds2D.cs | 4 +++- CelestialShadows/ShadowObject.cs | 8 ++++++-- Utils/ScreenSpaceShadow.cs | 8 +++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Atmosphere/Clouds2D.cs b/Atmosphere/Clouds2D.cs index 94eb509d..25b88633 100644 --- a/Atmosphere/Clouds2D.cs +++ b/Atmosphere/Clouds2D.cs @@ -216,6 +216,8 @@ internal void Apply(CelestialBody celestialBody, Transform scaledCelestialTransf screenSpaceShadow.material = new Material(ScreenSpaceCloudShadowShader); shadowMaterial.ApplyMaterialProperties(screenSpaceShadow.material); screenSpaceShadow.Init(); + screenSpaceShadowGO.SetActive(false); + screenSpaceShadow.SetActive(false); } @@ -306,7 +308,7 @@ public void Reassign(Tools.Layer layer, Transform parent, float worldScale) screenSpaceShadow.material.SetFloat("_PlanetRadius", (float)celestialBody.Radius * worldScale); screenSpaceShadowGO.SetActive(layer == Tools.Layer.Local); - + screenSpaceShadow.SetActive(layer == Tools.Layer.Local); } } } diff --git a/CelestialShadows/ShadowObject.cs b/CelestialShadows/ShadowObject.cs index cfa59aec..4bb8ed7a 100644 --- a/CelestialShadows/ShadowObject.cs +++ b/CelestialShadows/ShadowObject.cs @@ -65,13 +65,15 @@ public class LocalShadowComponent : MonoBehaviour List shadowList; public String GUID { get { return shadowMat.name; } } GameObject screenSpaceShadowGO; + ScreenSpaceShadow screenSpaceShadow; - internal void Apply(Material mat, CelestialBody cb, List list, GameObject go) + internal void Apply(Material mat, CelestialBody cb, List list, GameObject go, ScreenSpaceShadow scShadow) { shadowMat = mat; body = cb; shadowList = list; screenSpaceShadowGO = go; + screenSpaceShadow = scShadow; } internal void OnPreCull() @@ -95,6 +97,7 @@ internal void OnPreCull() } screenSpaceShadowGO.SetActive(body.pqsController.isActive); + screenSpaceShadow.SetActive(body.pqsController.isActive); } } } @@ -180,6 +183,7 @@ public void Apply() screenSpaceShadow.material = localShadowMat; screenSpaceShadow.Init(); screenSpaceShadowGO.SetActive(false); + screenSpaceShadow.SetActive(false); shadowMat.SetFloat(ShaderProperties._SunRadius_PROPERTY, (float)(ScaledSpace.InverseScaleFactor * Sun.Instance.sun.Radius)); localShadowMat.SetFloat(ShaderProperties._SunRadius_PROPERTY, (float)(Sun.Instance.sun.Radius)); @@ -205,7 +209,7 @@ public void Apply() } } sc.Apply(shadowMat, celestialBody, casters); - lsc.Apply(localShadowMat, celestialBody, casters, screenSpaceShadowGO); + lsc.Apply(localShadowMat, celestialBody, casters, screenSpaceShadowGO, screenSpaceShadow); } ApplyToMainMenu(); diff --git a/Utils/ScreenSpaceShadow.cs b/Utils/ScreenSpaceShadow.cs index 23955eeb..1df5032a 100644 --- a/Utils/ScreenSpaceShadow.cs +++ b/Utils/ScreenSpaceShadow.cs @@ -12,11 +12,13 @@ public class ScreenSpaceShadow : MonoBehaviour { public Material material; + MeshRenderer shadowMR; + public void Init() { Quad.Create(gameObject, 2, Color.white, Vector3.up, Mathf.Infinity); - MeshRenderer shadowMR = gameObject.AddComponent(); + shadowMR = gameObject.AddComponent(); material.SetOverrideTag("IgnoreProjector", "True"); shadowMR.sharedMaterial = material; @@ -25,7 +27,11 @@ public void Init() shadowMR.enabled = true; gameObject.layer = (int)Tools.Layer.Local; + } + public void SetActive(bool active) + { + shadowMR.enabled = active; } void OnWillRenderObject() From 09e88508ca1a2ac88818a50b237a94a5a751cfc5 Mon Sep 17 00:00:00 2001 From: lghassen Date: Sun, 16 Aug 2020 19:07:17 +0200 Subject: [PATCH 10/26] prototype mixed resolution volumetrics (left to do: nearest depth upsampling, scatterer integration) --- Assets/Shaders/CloudVolumeParticle.shader | 7 +- Assets/Shaders/CompositeDeferredClouds.shader | 56 +++++ Assets/Shaders/Invisible.shader | 43 ++++ Atmosphere/Atmosphere.csproj | 1 + Atmosphere/CloudsVolume.cs | 2 +- .../DeferredVolumetricCloudsRenderer.cs | 206 ++++++++++++++++++ Atmosphere/VolumeSection.cs | 19 +- 7 files changed, 329 insertions(+), 5 deletions(-) create mode 100644 Assets/Shaders/CompositeDeferredClouds.shader create mode 100644 Assets/Shaders/Invisible.shader create mode 100644 Atmosphere/DeferredVolumetricCloudsRenderer.cs diff --git a/Assets/Shaders/CloudVolumeParticle.shader b/Assets/Shaders/CloudVolumeParticle.shader index 1cfedd83..93cbfa8c 100644 --- a/Assets/Shaders/CloudVolumeParticle.shader +++ b/Assets/Shaders/CloudVolumeParticle.shader @@ -2,7 +2,7 @@ // Here we have a single draw call passing a points mesh to the GPU // This shader then builds all the quads from the mesh using a geometry shader // This saves a ton of draw calls -Shader "EVE/GeometryCloudVolumeParticle" { +Shader "EVE/GeometryCloudVolumeParticleToTexture" { Properties { _Tex("Particle Texture", 2D) = "white" {} _MainTex("Main (RGB)", 2D) = "white" {} @@ -27,10 +27,11 @@ Shader "EVE/GeometryCloudVolumeParticle" { Category { Tags { "Queue"="Transparent+2" "IgnoreProjector"="True" "RenderType"="Transparent" "DisableBatching"="True" } - Blend SrcAlpha OneMinusSrcAlpha + //Blend SrcAlpha OneMinusSrcAlpha + Blend SrcAlpha OneMinusSrcAlpha, Zero OneMinusSrcAlpha //traditional alpha blending for colors, multiply by (1-alpha) for alpha to store in texture Fog { Mode Global} AlphaTest Greater 0 - ColorMask RGB + ColorMask RGBA //Cull Back Cull Off Lighting On diff --git a/Assets/Shaders/CompositeDeferredClouds.shader b/Assets/Shaders/CompositeDeferredClouds.shader new file mode 100644 index 00000000..eedd43c0 --- /dev/null +++ b/Assets/Shaders/CompositeDeferredClouds.shader @@ -0,0 +1,56 @@ +Shader "EVE/CompositeDeferredClouds" { + Properties{ + } + + SubShader{ + Tags { "Queue"="Transparent+2" "IgnoreProjector"="True" "RenderType"="Transparent"} + Pass { + //Blend One One // Additive + //Blend OneMinusDstColor One // Soft Additive + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + Offset 0, 0 + ColorMask RGB + CGPROGRAM + #pragma target 3.0 + #pragma vertex vert + #pragma fragment frag + + #include"UnityCG.cginc" + + uniform sampler2D cloudTexture; + + struct appdata_t { + float4 vertex : POSITION; + float3 normal : NORMAL; + }; + + struct v2f { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + v2f vert(appdata_t v) + { + v2f o; +#if defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE) + o.pos = float4(v.vertex.x, v.vertex.y *_ProjectionParams.x, -1.0 , 1.0); +#else + o.pos = float4(v.vertex.x, v.vertex.y *_ProjectionParams.x, 1.0 , 1.0); +#endif + o.uv = ComputeScreenPos(o.pos); + + return o; + } + + fixed4 frag(v2f IN) : COLOR + { + float4 color = tex2D(cloudTexture, IN.uv); + + return float4(color.rgb,1-color.a); //the alpha stored in the texture is 1*(1-alpha1)*(1-alpha2) etc, it's essentially the remaining alpha of the background + } + + ENDCG + } + } +} \ No newline at end of file diff --git a/Assets/Shaders/Invisible.shader b/Assets/Shaders/Invisible.shader new file mode 100644 index 00000000..a24c6664 --- /dev/null +++ b/Assets/Shaders/Invisible.shader @@ -0,0 +1,43 @@ +Shader "EVE/Invisible" +{ + SubShader + { + Tags {"Queue" = "Transparent" "IgnoreProjector"="True" "RenderType"="Invisible"} + + Pass + { + ZWrite Off + ZTest on + + Blend SrcAlpha OneMinusSrcAlpha + + + CGPROGRAM + #include "UnityCG.cginc" + #pragma target 3.0 + #pragma vertex vert + #pragma fragment frag + #pragma glsl + + struct v2f + { + float4 pos : SV_POSITION; + }; + + v2f vert(appdata_base v) + { + v2f OUT; + OUT.pos = float4(2.0, 2.0, 2.0, 1.0); //outside clip space => cull vertex + return OUT; + } + + + float4 frag(v2f IN) : COLOR + { + return float4(0.0,0.0,0.0,0.0); + } + + ENDCG + } + } +} \ No newline at end of file diff --git a/Atmosphere/Atmosphere.csproj b/Atmosphere/Atmosphere.csproj index 22b69cc5..54fdceed 100644 --- a/Atmosphere/Atmosphere.csproj +++ b/Atmosphere/Atmosphere.csproj @@ -133,6 +133,7 @@ + diff --git a/Atmosphere/CloudsVolume.cs b/Atmosphere/CloudsVolume.cs index 0e826f72..902624ec 100644 --- a/Atmosphere/CloudsVolume.cs +++ b/Atmosphere/CloudsVolume.cs @@ -66,7 +66,7 @@ private static Shader ParticleCloudShader { if (particleCloudShader == null) { - particleCloudShader = ShaderLoaderClass.FindShader("EVE/GeometryCloudVolumeParticle"); + particleCloudShader = ShaderLoaderClass.FindShader("EVE/GeometryCloudVolumeParticleToTexture"); } return particleCloudShader; } } diff --git a/Atmosphere/DeferredVolumetricCloudsRenderer.cs b/Atmosphere/DeferredVolumetricCloudsRenderer.cs new file mode 100644 index 00000000..3b232c06 --- /dev/null +++ b/Atmosphere/DeferredVolumetricCloudsRenderer.cs @@ -0,0 +1,206 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using UnityEngine.Rendering; +using ShaderLoader; +using Utils; + +namespace Atmosphere +{ + class DeferredVolumetricCloudsRenderer : MonoBehaviour //maybe rename this class + { + private static Dictionary CameraToDeferredVolumetricCloudsRenderer = new Dictionary(); + + public static void EnableForThisFrame(Camera cam, MeshRenderer mr, Material mat) + { + if (CameraToDeferredVolumetricCloudsRenderer.ContainsKey(cam)) + { + CameraToDeferredVolumetricCloudsRenderer[cam].EnableForThisFrame(mr, mat); + } + else + { + CameraToDeferredVolumetricCloudsRenderer[cam] = (DeferredVolumetricCloudsRenderer)cam.gameObject.AddComponent(typeof(DeferredVolumetricCloudsRenderer)); + } + } + + private static DeferredRendererToScreen deferredRendererToScreen; + + public static DeferredRendererToScreen DeferredRendererToScreen + { + get + { + if(deferredRendererToScreen == null) + { + Debug.Log("Ghassen Creating deferredRendererToScreen"); + //here create it and init it + GameObject deferredRendererToScreenGO = new GameObject("EVE deferredRendererToScreen"); + //deferredRendererToScreenGO.transform.parent = Camera.current.gameObject.transform; + deferredRendererToScreen = deferredRendererToScreenGO.AddComponent(); + deferredRendererToScreen.Init(); + } + return deferredRendererToScreen; + } + } + + bool renderingEnabled = false; + bool isInitialized = false; + + private Camera targetCamera; + private List commandBuffersAdded = new List(); + private RenderTexture targetRT; //target RT, 1/4 screen res to save performance + + + + //private CommandBuffer copyToScreenCommandBuffer; //commandBuffer to composite the results to screen, won't work because we don't control the renderqueue there + + //just add a static quad in this class, and enable it's meshrenderer when rendering is requested? (even if that reacts after 1 frame it's fine) + + //disable it onPostRender + + public DeferredVolumetricCloudsRenderer() + { + } + + public void Initialize() + { + targetCamera = GetComponent(); + + if (!ReferenceEquals(targetCamera.activeTexture, null)) + { + targetRT = new RenderTexture(targetCamera.activeTexture.width / 2, targetCamera.activeTexture.height / 2, 0, RenderTextureFormat.ARGB32); + targetRT.anisoLevel = 1; + targetRT.antiAliasing = 1; + targetRT.volumeDepth = 0; + targetRT.useMipMap = true; + targetRT.autoGenerateMips = false; + targetRT.Create(); + + isInitialized = true; + Debug.Log("DeferredVolumetricCloudsRenderer initialized successfully!!!"); + } + } + + public void EnableForThisFrame(MeshRenderer mr, Material mat) + { + if (isInitialized) + { + CommandBuffer cb = new CommandBuffer(); + cb.SetRenderTarget(targetRT); + if (!renderingEnabled) + { + //clear texture + cb.ClearRenderTarget(false, true, Color.black); + + DeferredRendererToScreen.SetActive(true); + DeferredRendererToScreen.SetRenderTexture(targetRT); + } + cb.DrawRenderer(mr, mat); //does this still draw it with the active camera's stuff? yes, shader already takes into account depth buffer and all without any more work needed on my side + targetCamera.AddCommandBuffer(CameraEvent.AfterForwardOpaque, cb); + commandBuffersAdded.Add(cb); + renderingEnabled = true; + } + } + + void OnPostRender() + { + if (!isInitialized) + { + Initialize(); + } + else + { + if (renderingEnabled) + { + foreach (var cb in commandBuffersAdded) + { + targetCamera.RemoveCommandBuffer(CameraEvent.AfterForwardOpaque, cb); + } + commandBuffersAdded.Clear(); + renderingEnabled = false; + } + //else + //{ + // //if rendering was disabled for this frame set deferred copier to disabled + // //DeferredRendererToScreen.SetActive(false); //doesn't work, causes flickering, why? + //} + } + + } + + public void OnDestroy() + { + Debug.Log("OnDestroy called on ScreenCopyCommandBuffer"); + if (!ReferenceEquals(targetCamera, null)) + { + targetRT.Release(); + + foreach (var cb in commandBuffersAdded) + { + targetCamera.RemoveCommandBuffer(CameraEvent.AfterForwardOpaque, cb); + } + commandBuffersAdded.Clear(); + + renderingEnabled = false; + } + } + } + + public class DeferredRendererNotifier : MonoBehaviour + { + MeshRenderer mr; + public Material mat; + + public DeferredRendererNotifier() + { + mr = gameObject.GetComponent(); + } + + void OnWillRenderObject() + { + if (mat != null) + DeferredVolumetricCloudsRenderer.EnableForThisFrame(Camera.current, mr, mat ); + } + } + + public class DeferredRendererToScreen : MonoBehaviour + { + Material material; + + MeshRenderer shadowMR; + + public void Init() + { + material = new Material(ShaderLoaderClass.FindShader("EVE/CompositeDeferredClouds")); + + Quad.Create(gameObject, 2, Color.white, Vector3.up, Mathf.Infinity); + + shadowMR = gameObject.AddComponent(); + material.SetOverrideTag("IgnoreProjector", "True"); + shadowMR.sharedMaterial = material; + + shadowMR.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; + shadowMR.receiveShadows = false; + shadowMR.enabled = true; + + gameObject.layer = (int)Tools.Layer.Local; + } + + public void SetRenderTexture(RenderTexture RT) + { + material.SetTexture("cloudTexture", RT); + } + + public void SetActive(bool active) + { + //Debug.Log("Ghassen DeferredRendererToScreen SetActive "+active.ToString()); + shadowMR.enabled = active; + } + + public void OnWillRenderObject() + { + //Debug.Log("Ghassen DeferredRendererToScreen on will renderObject"); + } + } +} diff --git a/Atmosphere/VolumeSection.cs b/Atmosphere/VolumeSection.cs index 53fe1088..b1a5df3a 100644 --- a/Atmosphere/VolumeSection.cs +++ b/Atmosphere/VolumeSection.cs @@ -5,6 +5,7 @@ using System.Text; using UnityEngine; using EVEManager; +using ShaderLoader; namespace Atmosphere { @@ -86,13 +87,29 @@ public CloudMesh(Material cloudParticleMaterial, Vector2 size, Transform parent, //Debug.Log("vertices.Count() " + vertices.Count()); MeshRenderer mr = cloudMesh.AddComponent(); - mr.sharedMaterial = cloudParticleMaterial; + //mr.sharedMaterial = cloudParticleMaterial; + mr.sharedMaterial = new Material(InvisibleShader); //this may throw off scatterer's integration though, so check that mr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; mr.receiveShadows = false; mr.enabled = true; + + DeferredRendererNotifier notifier = cloudMesh.AddComponent(); + notifier.mat = cloudParticleMaterial; } + private static Shader invisibleShader = null; + private static Shader InvisibleShader + { + get + { + if (invisibleShader == null) + { + invisibleShader = ShaderLoaderClass.FindShader("EVE/Invisible"); + } + return invisibleShader; + } + } internal void Destroy() { From 01b294c14aa9e684f15cbdc6a739e059d97ceb6c Mon Sep 17 00:00:00 2001 From: lghassen Date: Mon, 17 Aug 2020 21:18:10 +0200 Subject: [PATCH 11/26] nearest depth volumetrics upsampling --- Assets/Shaders/CloudVolumeParticle.shader | 7 +- Assets/Shaders/CompositeDeferredClouds.shader | 78 +++++++++++++++++-- Assets/Shaders/DownscaleDepth.shader | 59 ++++++++++++++ .../DeferredVolumetricCloudsRenderer.cs | 61 +++++++++------ 4 files changed, 172 insertions(+), 33 deletions(-) create mode 100644 Assets/Shaders/DownscaleDepth.shader diff --git a/Assets/Shaders/CloudVolumeParticle.shader b/Assets/Shaders/CloudVolumeParticle.shader index 93cbfa8c..b6bc76b1 100644 --- a/Assets/Shaders/CloudVolumeParticle.shader +++ b/Assets/Shaders/CloudVolumeParticle.shader @@ -82,9 +82,7 @@ Shader "EVE/GeometryCloudVolumeParticleToTexture" { float4 _NoiseScale; float3 _MaxTrans; - sampler2D _CameraDepthTexture; - - // float4x4 _CameraToWorld; + sampler2D EVEDownscaledDepth; struct appdata_t { float4 vertex : POSITION; @@ -316,7 +314,8 @@ Shader "EVE/GeometryCloudVolumeParticleToTexture" { color.rgb *= ScatterColorLight(IN.lightDirT, IN.viewDirT, normT, tex, _MinScatter, _Opacity, 1).rgb; #ifdef SOFT_DEPTH_ON - float depth = UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(IN.projPos))); + //float depth = UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(IN.projPos))); + float depth = UNITY_SAMPLE_DEPTH(tex2Dlod(EVEDownscaledDepth, float4(IN.projPos.xy/IN.projPos.w,0.0,0.0))); //to be sure we are reading a single point/using point filtering depth = LinearEyeDepth (depth); float partZ = IN.projPos.z; float fade = saturate (_InvFade * (depth-partZ)); diff --git a/Assets/Shaders/CompositeDeferredClouds.shader b/Assets/Shaders/CompositeDeferredClouds.shader index eedd43c0..f13f1ea0 100644 --- a/Assets/Shaders/CompositeDeferredClouds.shader +++ b/Assets/Shaders/CompositeDeferredClouds.shader @@ -1,12 +1,12 @@ -Shader "EVE/CompositeDeferredClouds" { +// Composits the 1/4 res volumetrics into the scene using nearest-depth upscaling + +Shader "EVE/CompositeDeferredClouds" { Properties{ } SubShader{ Tags { "Queue"="Transparent+2" "IgnoreProjector"="True" "RenderType"="Transparent"} Pass { - //Blend One One // Additive - //Blend OneMinusDstColor One // Soft Additive Blend SrcAlpha OneMinusSrcAlpha ZWrite Off Offset 0, 0 @@ -20,6 +20,13 @@ uniform sampler2D cloudTexture; + uniform sampler2D _CameraDepthTexture; + float4 _CameraDepthTexture_TexelSize; + + uniform sampler2D EVEDownscaledDepth; + float4 EVEDownscaledDepth_TexelSize; + + struct appdata_t { float4 vertex : POSITION; float3 normal : NORMAL; @@ -43,9 +50,70 @@ return o; } - fixed4 frag(v2f IN) : COLOR + void UpdateNearestSample( inout float MinDist, + inout float2 NearestUV, + float Z, + float2 UV, + float ZFull + ) + { + float Dist = abs(Z - ZFull); + if (Dist < MinDist) + { + MinDist = Dist; + NearestUV = UV; + } + } + + + float4 frag(v2f i) : COLOR { - float4 color = tex2D(cloudTexture, IN.uv); + + //read full resolution depth + float ZFull = Linear01Depth( SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, i.uv) ); + + //find low res depth texture texel size + float2 lowResTexelSize = 2.0 * _CameraDepthTexture_TexelSize.xy; + float depthTreshold = 0.01; //play with this? + + float2 lowResUV = i.uv; + + float MinDist = 1.e8f; + + float2 UV00 = lowResUV - 0.5 * lowResTexelSize; + float2 NearestUV = UV00; + float Z00 = Linear01Depth( SAMPLE_DEPTH_TEXTURE( EVEDownscaledDepth, UV00) ); + UpdateNearestSample(MinDist, NearestUV, Z00, UV00, ZFull); + + float2 UV10 = float2(UV00.x+lowResTexelSize.x, UV00.y); + float Z10 = Linear01Depth( SAMPLE_DEPTH_TEXTURE( EVEDownscaledDepth, UV10) ); + UpdateNearestSample(MinDist, NearestUV, Z10, UV10, ZFull); + + float2 UV01 = float2(UV00.x, UV00.y+lowResTexelSize.y); + float Z01 = Linear01Depth( SAMPLE_DEPTH_TEXTURE( EVEDownscaledDepth, UV01) ); + UpdateNearestSample(MinDist, NearestUV, Z01, UV01, ZFull); + + float2 UV11 = UV00 + lowResTexelSize; + float Z11 = Linear01Depth( SAMPLE_DEPTH_TEXTURE( EVEDownscaledDepth, UV11) ); + UpdateNearestSample(MinDist, NearestUV, Z11, UV11, ZFull); + + float4 color = float4(0,0,0,0); + + //couldn't get this to work, I suspect my depthThreshold is too small, so for now no bilinear sampling over the same surface, only nearest sample, looks fine though + +// [branch] +// if (abs(Z00 - ZFull) < depthTreshold && +// abs(Z10 - ZFull) < depthTreshold && +// abs(Z01 - ZFull) < depthTreshold && +// abs(Z11 - ZFull) < depthTreshold ) +// { +// color = tex2Dlod( cloudTexture, float4(lowResUV,0,0)) ; +// } +// else +// { + color = tex2Dlod(cloudTexture, float4(NearestUV,0,0)) ; +// } + return float4(color.rgb,1-color.a); //the alpha stored in the texture is 1*(1-alpha1)*(1-alpha2) etc, it's essentially the remaining alpha of the background } diff --git a/Assets/Shaders/DownscaleDepth.shader b/Assets/Shaders/DownscaleDepth.shader new file mode 100644 index 00000000..f2de5a7f --- /dev/null +++ b/Assets/Shaders/DownscaleDepth.shader @@ -0,0 +1,59 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "EVE/DownscaleDepth" +{ + SubShader + { + Pass + { + ZTest Always Cull Off ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _CameraDepthTexture; + float4 _CameraDepthTexture_TexelSize; // (1.0/width, 1.0/height, width, height) + + sampler2D _MainTex; + + v2f vert( appdata_img v ) + { + v2f o = (v2f)0; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.texcoord; + + return o; + } + + float4 frag(v2f input) : SV_Target + { + float2 texelSize = 0.5 * _CameraDepthTexture_TexelSize.xy; + float2 taps[4] = { float2(input.uv + float2(-1,-1)*texelSize), + float2(input.uv + float2(-1,1)*texelSize), + float2(input.uv + float2(1,-1)*texelSize), + float2(input.uv + float2(1,1)*texelSize) }; + + float depth1 = tex2D(_CameraDepthTexture, taps[0]).r; + float depth2 = tex2D(_CameraDepthTexture, taps[1]).r; + float depth3 = tex2D(_CameraDepthTexture, taps[2]).r; + float depth4 = tex2D(_CameraDepthTexture, taps[3]).r; + + float result = min(depth1, min(depth2, min(depth3, depth4))); //takes min depth, for reverse Z equivalent to taking farthest, may or may not be better for depth discontinuities, test both + + return result; + } + + ENDCG + } + } + Fallback off +} \ No newline at end of file diff --git a/Atmosphere/DeferredVolumetricCloudsRenderer.cs b/Atmosphere/DeferredVolumetricCloudsRenderer.cs index 3b232c06..3409f817 100644 --- a/Atmosphere/DeferredVolumetricCloudsRenderer.cs +++ b/Atmosphere/DeferredVolumetricCloudsRenderer.cs @@ -9,7 +9,7 @@ namespace Atmosphere { - class DeferredVolumetricCloudsRenderer : MonoBehaviour //maybe rename this class + class DeferredVolumetricCloudsRenderer : MonoBehaviour { private static Dictionary CameraToDeferredVolumetricCloudsRenderer = new Dictionary(); @@ -33,10 +33,7 @@ public static DeferredRendererToScreen DeferredRendererToScreen { if(deferredRendererToScreen == null) { - Debug.Log("Ghassen Creating deferredRendererToScreen"); - //here create it and init it GameObject deferredRendererToScreenGO = new GameObject("EVE deferredRendererToScreen"); - //deferredRendererToScreenGO.transform.parent = Camera.current.gameObject.transform; deferredRendererToScreen = deferredRendererToScreenGO.AddComponent(); deferredRendererToScreen.Init(); } @@ -49,15 +46,9 @@ public static DeferredRendererToScreen DeferredRendererToScreen private Camera targetCamera; private List commandBuffersAdded = new List(); - private RenderTexture targetRT; //target RT, 1/4 screen res to save performance - - - - //private CommandBuffer copyToScreenCommandBuffer; //commandBuffer to composite the results to screen, won't work because we don't control the renderqueue there - - //just add a static quad in this class, and enable it's meshrenderer when rendering is requested? (even if that reacts after 1 frame it's fine) - - //disable it onPostRender + private RenderTexture targetRT; //target RT, 1/4 screen res to save performance + private RenderTexture downscaledDepthRT; + Material downscaleDepthMaterial; public DeferredVolumetricCloudsRenderer() { @@ -73,12 +64,24 @@ public void Initialize() targetRT.anisoLevel = 1; targetRT.antiAliasing = 1; targetRT.volumeDepth = 0; - targetRT.useMipMap = true; + targetRT.useMipMap = false; targetRT.autoGenerateMips = false; targetRT.Create(); + targetRT.filterMode = FilterMode.Point; //might need a way to access both point and bilinear + + downscaledDepthRT = new RenderTexture(targetCamera.activeTexture.width / 2, targetCamera.activeTexture.height / 2, 0, RenderTextureFormat.RFloat); + downscaledDepthRT.anisoLevel = 1; + downscaledDepthRT.antiAliasing = 1; + downscaledDepthRT.volumeDepth = 0; + downscaledDepthRT.useMipMap = false; + downscaledDepthRT.autoGenerateMips = false; + downscaledDepthRT.Create(); + + downscaledDepthRT.filterMode = FilterMode.Point; + + downscaleDepthMaterial = new Material(ShaderLoaderClass.FindShader("EVE/DownscaleDepth")); isInitialized = true; - Debug.Log("DeferredVolumetricCloudsRenderer initialized successfully!!!"); } } @@ -87,16 +90,23 @@ public void EnableForThisFrame(MeshRenderer mr, Material mat) if (isInitialized) { CommandBuffer cb = new CommandBuffer(); - cb.SetRenderTarget(targetRT); + if (!renderingEnabled) { - //clear texture - cb.ClearRenderTarget(false, true, Color.black); - DeferredRendererToScreen.SetActive(true); DeferredRendererToScreen.SetRenderTexture(targetRT); + + //downscale depth + cb.Blit(null, downscaledDepthRT, downscaleDepthMaterial); + cb.SetGlobalTexture("EVEDownscaledDepth", downscaledDepthRT); + DeferredRendererToScreen.SetDepthTexture(downscaledDepthRT); + + //clear target rendertexture + cb.SetRenderTarget(targetRT); + cb.ClearRenderTarget(false, true, Color.black); } - cb.DrawRenderer(mr, mat); //does this still draw it with the active camera's stuff? yes, shader already takes into account depth buffer and all without any more work needed on my side + + cb.DrawRenderer(mr, mat); targetCamera.AddCommandBuffer(CameraEvent.AfterForwardOpaque, cb); commandBuffersAdded.Add(cb); renderingEnabled = true; @@ -123,7 +133,7 @@ void OnPostRender() //else //{ // //if rendering was disabled for this frame set deferred copier to disabled - // //DeferredRendererToScreen.SetActive(false); //doesn't work, causes flickering, why? + // //DeferredRendererToScreen.SetActive(false); //doesn't work, causes flickering, why? doesn't work because OnPostRender is not called if there is no rendering //} } @@ -131,7 +141,6 @@ void OnPostRender() public void OnDestroy() { - Debug.Log("OnDestroy called on ScreenCopyCommandBuffer"); if (!ReferenceEquals(targetCamera, null)) { targetRT.Release(); @@ -192,15 +201,19 @@ public void SetRenderTexture(RenderTexture RT) material.SetTexture("cloudTexture", RT); } + public void SetDepthTexture(RenderTexture RT) + { + material.SetTexture("EVEDownscaledDepth", RT); + } + public void SetActive(bool active) { - //Debug.Log("Ghassen DeferredRendererToScreen SetActive "+active.ToString()); shadowMR.enabled = active; } public void OnWillRenderObject() { - //Debug.Log("Ghassen DeferredRendererToScreen on will renderObject"); + } } } From cff678d58d83dd33e8206537960b561059947f21 Mon Sep 17 00:00:00 2001 From: lghassen Date: Mon, 17 Aug 2020 22:50:16 +0200 Subject: [PATCH 12/26] back-to-front to-texture rendering + fix stuck volumetric layers on disabling --- .../DeferredVolumetricCloudsRenderer.cs | 55 +++++++++++++++---- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/Atmosphere/DeferredVolumetricCloudsRenderer.cs b/Atmosphere/DeferredVolumetricCloudsRenderer.cs index 3409f817..2b7707cf 100644 --- a/Atmosphere/DeferredVolumetricCloudsRenderer.cs +++ b/Atmosphere/DeferredVolumetricCloudsRenderer.cs @@ -6,6 +6,8 @@ using UnityEngine.Rendering; using ShaderLoader; using Utils; +using System.Collections; + namespace Atmosphere { @@ -49,6 +51,10 @@ public static DeferredRendererToScreen DeferredRendererToScreen private RenderTexture targetRT; //target RT, 1/4 screen res to save performance private RenderTexture downscaledDepthRT; Material downscaleDepthMaterial; + CommandBuffer clearTextureBuffer; + + // pairs of volumetric clouds renderers and their materials, sorted by distance, for rendering farthest to closest + SortedList> renderersAdded = new SortedList>(); public DeferredVolumetricCloudsRenderer() { @@ -81,6 +87,10 @@ public void Initialize() downscaleDepthMaterial = new Material(ShaderLoaderClass.FindShader("EVE/DownscaleDepth")); + clearTextureBuffer = new CommandBuffer(); + clearTextureBuffer.SetRenderTarget(targetRT); + clearTextureBuffer.ClearRenderTarget(false, true, Color.black); + isInitialized = true; } } @@ -89,10 +99,12 @@ public void EnableForThisFrame(MeshRenderer mr, Material mat) { if (isInitialized) { - CommandBuffer cb = new CommandBuffer(); - if (!renderingEnabled) { + targetCamera.RemoveCommandBuffer (CameraEvent.AfterForwardOpaque, clearTextureBuffer); + + CommandBuffer cb = new CommandBuffer(); + DeferredRendererToScreen.SetActive(true); DeferredRendererToScreen.SetRenderTexture(targetRT); @@ -104,15 +116,38 @@ public void EnableForThisFrame(MeshRenderer mr, Material mat) //clear target rendertexture cb.SetRenderTarget(targetRT); cb.ClearRenderTarget(false, true, Color.black); + + targetCamera.AddCommandBuffer(CameraEvent.AfterForwardOpaque, cb); + + commandBuffersAdded.Add(cb); } - cb.DrawRenderer(mr, mat); - targetCamera.AddCommandBuffer(CameraEvent.AfterForwardOpaque, cb); - commandBuffersAdded.Add(cb); + renderersAdded.Add(mr.gameObject.transform.position.magnitude, new Tuple(mr, mat)); + + renderingEnabled = true; } } + void OnPreRender() + { + //sort cloud layers by decreasing distance to camera and render them farthest to closest + if (renderingEnabled) + { + foreach (var elt in renderersAdded.Reverse()) + { + CommandBuffer cb = new CommandBuffer(); + + cb.SetRenderTarget(targetRT); + cb.DrawRenderer(elt.Value.Item1, elt.Value.Item2); + + targetCamera.AddCommandBuffer(CameraEvent.AfterForwardOpaque, cb); + + commandBuffersAdded.Add(cb); + } + } + } + void OnPostRender() { if (!isInitialized) @@ -128,13 +163,13 @@ void OnPostRender() targetCamera.RemoveCommandBuffer(CameraEvent.AfterForwardOpaque, cb); } commandBuffersAdded.Clear(); + renderersAdded.Clear(); + + //add a clear texture buffer, remove it when we restart rendering + targetCamera.AddCommandBuffer(CameraEvent.AfterForwardOpaque, clearTextureBuffer); + renderingEnabled = false; } - //else - //{ - // //if rendering was disabled for this frame set deferred copier to disabled - // //DeferredRendererToScreen.SetActive(false); //doesn't work, causes flickering, why? doesn't work because OnPostRender is not called if there is no rendering - //} } } From 97bc82d230d56915f5fa17c311efd2906d16a5c6 Mon Sep 17 00:00:00 2001 From: lghassen Date: Wed, 19 Aug 2020 19:07:24 +0200 Subject: [PATCH 13/26] free back-to-front sorting for cloud particles --- Utils/HexSeg.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Utils/HexSeg.cs b/Utils/HexSeg.cs index 5da7a178..503018ac 100644 --- a/Utils/HexSeg.cs +++ b/Utils/HexSeg.cs @@ -158,6 +158,13 @@ public Mesh BuildPointsMesh() { List pointList = GetPoints(); + // Sort points by distance from the center of the mesh + // Since we snap the mesh to always be around the camera when it moves + // and we are using a geometry shader which process vertices in the order they are defined + // This effectively gives us free back to front sorting for the transparencies + pointList.Sort((vec1, vec2) => vec1.magnitude.CompareTo(vec2.magnitude)); + pointList.Reverse(); + int[] indices = new int[pointList.Count]; for (int i = 0; i < indices.Length; i++) From e990baffc076bffaceb55a0b8fd11a4acde11e91 Mon Sep 17 00:00:00 2001 From: lghassen Date: Wed, 19 Aug 2020 19:14:26 +0200 Subject: [PATCH 14/26] pick a more neutral color for the deferred clouds background --- Atmosphere/DeferredVolumetricCloudsRenderer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Atmosphere/DeferredVolumetricCloudsRenderer.cs b/Atmosphere/DeferredVolumetricCloudsRenderer.cs index 2b7707cf..0ae9f99e 100644 --- a/Atmosphere/DeferredVolumetricCloudsRenderer.cs +++ b/Atmosphere/DeferredVolumetricCloudsRenderer.cs @@ -115,7 +115,7 @@ public void EnableForThisFrame(MeshRenderer mr, Material mat) //clear target rendertexture cb.SetRenderTarget(targetRT); - cb.ClearRenderTarget(false, true, Color.black); + cb.ClearRenderTarget(false, true, Color.gray); targetCamera.AddCommandBuffer(CameraEvent.AfterForwardOpaque, cb); From df667e991d9bf45e2468a207edd124b846ff8bb4 Mon Sep 17 00:00:00 2001 From: lghassen Date: Wed, 19 Aug 2020 19:28:26 +0200 Subject: [PATCH 15/26] integrate changes from R-T-B --- Atmosphere/Clouds2D.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Atmosphere/Clouds2D.cs b/Atmosphere/Clouds2D.cs index 25b88633..ec7e98cb 100644 --- a/Atmosphere/Clouds2D.cs +++ b/Atmosphere/Clouds2D.cs @@ -256,7 +256,7 @@ public void Reassign(Tools.Layer layer, Transform parent, float worldScale) CloudMaterial.SetFloat("_OceanRadius", (float)celestialBody.Radius * worldScale); CloudMaterial.EnableKeyword("WORLD_SPACE_ON"); CloudMaterial.EnableKeyword("SOFT_DEPTH_ON"); - CloudMaterial.renderQueue = (int)Tools.Queue.Transparent + 2; + CloudMaterial.renderQueue = (int)Tools.Queue.Transparent - 1; } else { From c7ccf8f9b809473099fb83c17a4ae636284b1e0b Mon Sep 17 00:00:00 2001 From: R-T-B <21GunSoftware@comcast.net> Date: Fri, 3 Apr 2020 20:28:47 -0700 Subject: [PATCH 16/26] Commit shader changes, try to build eve shaders OMG that project is out of date --- Assets/Shaders/SphereCloud.shader | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/Shaders/SphereCloud.shader b/Assets/Shaders/SphereCloud.shader index 99fa5264..9d3083e2 100644 --- a/Assets/Shaders/SphereCloud.shader +++ b/Assets/Shaders/SphereCloud.shader @@ -151,7 +151,9 @@ Shader "EVE/Cloud" { struct fout { half4 color : COLOR; +#if !SHADER_API_D3D11 float depth : DEPTH; +#endif }; fout frag(v2f IN) @@ -222,7 +224,11 @@ Shader "EVE/Cloud" { depthWithOffset *= _DepthPull; OUT.color.a *= step(0, dot(IN.viewDir, worldNormal)); #endif + +#if !SHADER_API_D3D11 //fixes clouds fading into the planet when zooming out OUT.depth = (1.0 - depthWithOffset * _ZBufferParams.w) / (depthWithOffset * _ZBufferParams.z); +#endif + return OUT; } ENDCG From 43b067162024efa2098c7e55ff294a2d8282f8d4 Mon Sep 17 00:00:00 2001 From: R-T-B <21GunSoftware@comcast.net> Date: Sat, 4 Apr 2020 06:27:08 -0700 Subject: [PATCH 17/26] Forgot this... oops... --- Assets/Shaders/SphereCloud.shader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Shaders/SphereCloud.shader b/Assets/Shaders/SphereCloud.shader index 9d3083e2..6eb19527 100644 --- a/Assets/Shaders/SphereCloud.shader +++ b/Assets/Shaders/SphereCloud.shader @@ -151,7 +151,7 @@ Shader "EVE/Cloud" { struct fout { half4 color : COLOR; -#if !SHADER_API_D3D11 +#if !(SHADER_API_D3D11 && WORLD_SPACE_ON) float depth : DEPTH; #endif }; @@ -225,7 +225,7 @@ Shader "EVE/Cloud" { OUT.color.a *= step(0, dot(IN.viewDir, worldNormal)); #endif -#if !SHADER_API_D3D11 //fixes clouds fading into the planet when zooming out +#if !(SHADER_API_D3D11 && WORLD_SPACE_ON) //fixes clouds fading into the planet when zooming out OUT.depth = (1.0 - depthWithOffset * _ZBufferParams.w) / (depthWithOffset * _ZBufferParams.z); #endif From 03de4d86fae48304a94f30fd85ef7a2e11ff2614 Mon Sep 17 00:00:00 2001 From: R-T-B <21GunSoftware@comcast.net> Date: Tue, 11 Aug 2020 07:47:55 -0700 Subject: [PATCH 18/26] Integrate @BIOZ from KSP Forums fixes. --- Assets/Shaders/SpherePlanet.shader | 321 ++++++++++++++++------------- Terrain/TerrainObject.cs | 6 +- Terrain/TerrainPQS.cs | 103 +++++---- Utils/MaterialManager.cs | 6 +- 4 files changed, 250 insertions(+), 186 deletions(-) diff --git a/Assets/Shaders/SpherePlanet.shader b/Assets/Shaders/SpherePlanet.shader index fbcb9395..ae3b25c4 100644 --- a/Assets/Shaders/SpherePlanet.shader +++ b/Assets/Shaders/SpherePlanet.shader @@ -2,8 +2,10 @@ // Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' -Shader "EVE/Planet" { - Properties { +Shader "EVE/Planet" +{ + Properties + { _Color ("Color Tint", Color) = (1,1,1,1) _SpecularColor ("Specular tint", Color) = (1,1,1,1) _SpecularPower ("Shininess", Float) = 0.078125 @@ -15,6 +17,8 @@ Shader "EVE/Planet" { _DetailOffset ("Detail Offset", Vector) = (.5,.5,0,0) _DetailVertScale ("Detail Scale", Range(0,1000)) = 200 _DetailDist ("Detail Distance", Range(0,1)) = 0.00875 + _DetailOpacityMin ("Detail Min Opacity", Range(0,1)) = 0.1 + _DetailOpacityMax ("Detail Max Opacity", Range(0,1)) = 1.0 _MinLight ("Minimum Light", Range(0,1)) = 0 _Albedo ("Albedo Index", Range(0,5)) = 1.2 _CityOverlayTex ("Overlay (RGB)", 2D) = "white" {} @@ -22,157 +26,180 @@ Shader "EVE/Planet" { _CityDarkOverlayDetailTex ("Overlay Detail (RGB) (A)", 2D) = "white" {} _CityLightOverlayDetailTex ("Overlay Detail (RGB) (A)", 2D) = "white" {} } - -SubShader { - -Tags { "Queue"="Geometry" "RenderType"="Opaque" } - Fog { Mode Global} - ColorMask RGB - Cull Back Lighting On ZWrite On - - Pass { - - Lighting On - Tags { "LightMode"="ForwardBase"} - - CGPROGRAM - - #include "EVEUtils.cginc" - #include "UnityCG.cginc" - #include "AutoLight.cginc" - #include "Lighting.cginc" - #include "alphaMap.cginc" - #include "cubeMap.cginc" - #pragma target 3.0 - #pragma glsl - #pragma vertex vert - #pragma fragment frag - #define MAG_ONE 1.4142135623730950488016887242097 - #pragma fragmentoption ARB_precision_hint_fastest - #pragma multi_compile_fwdbase - #pragma multi_compile_fwdadd_fullshadows - #pragma multi_compile CITYOVERLAY_OFF CITYOVERLAY_ON - #pragma multi_compile DETAIL_MAP_OFF DETAIL_MAP_ON - #pragma multi_compile OCEAN_OFF OCEAN_ON - - - fixed4 _Color; - float _SpecularPower; - half4 _SpecularColor; - sampler2D _MainTex; - sampler2D _BumpMap; - sampler2D _midTex; - sampler2D _steepTex; - float _DetailScale; - fixed4 _DetailOffset; - float _DetailVertScale; - float _DetailDist; - float _MinLight; - float _Albedo; - - #ifdef CITYOVERLAY_ON - sampler2D _CityOverlayTex; - float _CityOverlayDetailScale; - sampler2D _CityDarkOverlayDetailTex; - sampler2D _CityLightOverlayDetailTex; - #endif - - struct appdata_t { + + SubShader + { + + Tags { "Queue"="Geometry" "RenderType"="Opaque" } + Fog { Mode Global} + ColorMask RGB + Cull Back Lighting On ZWrite On + + Pass + { + + Lighting On + Tags { "LightMode"="ForwardBase"} + + CGPROGRAM + + #include "EVEUtils.cginc" + #include "UnityCG.cginc" + #include "AutoLight.cginc" + #include "Lighting.cginc" + #include "alphaMap.cginc" + #include "cubeMap.cginc" + #pragma target 3.0 + #pragma glsl + #pragma vertex vert + #pragma fragment frag + #define MAG_ONE 1.4142135623730950488016887242097 + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_fwdbase + #pragma multi_compile_fwdadd_fullshadows + #pragma multi_compile CITYOVERLAY_OFF CITYOVERLAY_ON + #pragma multi_compile DETAIL_MAP_OFF DETAIL_MAP_ON + #pragma multi_compile OCEAN_OFF OCEAN_ON + + fixed4 _Color; + float _SpecularPower; + half4 _SpecularColor; + sampler2D _MainTex; + sampler2D _BumpMap; + sampler2D _midTex; + sampler2D _steepTex; + float _DetailScale; + fixed4 _DetailOffset; + float _DetailVertScale; + float _DetailDist; + float _DetailOpacityMin; + float _DetailOpacityMax; + float _MinLight; + float _Albedo; + + #ifdef CITYOVERLAY_ON + sampler2D _CityOverlayTex; + float _CityOverlayDetailScale; + sampler2D _CityDarkOverlayDetailTex; + sampler2D _CityLightOverlayDetailTex; + #endif + + struct appdata_t + { float4 vertex : POSITION; float3 normal : NORMAL; float4 tangent : TANGENT; }; - struct v2f { - float4 pos : SV_POSITION; - float viewDist : TEXCOORD0; - float3 viewDirT : TEXCOORD1; - float3 sphereNormal : TEXCOORD2; - float3 worldNormal : TEXCOORD3; - float3 lightDirT : TEXCOORD5; - LIGHTING_COORDS(6,7) - }; - - - v2f vert (appdata_t v) - { - v2f o; - o.pos = UnityObjectToClipPos(v.vertex); - - float3 vertexPos = mul(unity_ObjectToWorld, v.vertex).xyz; - o.viewDist = distance(vertexPos,_WorldSpaceCameraPos); - - float3 origin = mul(unity_ObjectToWorld, float4(0,0,0,1)).xyz; - - o.sphereNormal = -normalize(v.vertex); - - o.worldNormal = normalize(mul( unity_ObjectToWorld, float4( v.normal, 0.0 ) ).xyz); - - TANGENT_SPACE_ROTATION; - o.lightDirT = normalize(mul(rotation, ObjSpaceLightDir(v.vertex))); - o.viewDirT = normalize(mul(rotation, ObjSpaceViewDir(v.vertex))); - TRANSFER_VERTEX_TO_FRAGMENT(o); - - return o; - } - - - fixed4 frag (v2f IN) : COLOR - { - half4 color; - float3 sphereNrm = IN.sphereNormal; - half4 main = GET_CUBE_MAP_1(_MainTex, IN.sphereNormal); - main = ALPHA_COLOR_1(main); - half3 normT = UnpackNormal(GET_CUBE_MAP_1(_BumpMap, IN.sphereNormal)); - - half4 detail = GetCubeDetailMap(_midTex, IN.sphereNormal, _DetailScale); - - #ifdef CITYOVERLAY_ON - half4 cityoverlay = GET_CUBE_MAP_1(_CityOverlayTex, IN.sphereNormal); - cityoverlay = ALPHA_COLOR_1(cityoverlay); - half4 citydarkoverlaydetail = GetCubeDetailMap(_CityDarkOverlayDetailTex, IN.sphereNormal, _CityOverlayDetailScale); - half4 citylightoverlaydetail = GetCubeDetailMap(_CityLightOverlayDetailTex, IN.sphereNormal, _CityOverlayDetailScale); - #endif + struct v2f + { + float4 pos : SV_POSITION; + float viewDist : TEXCOORD0; + float3 viewDirT : TEXCOORD1; + float3 sphereNormal : TEXCOORD2; + float3 worldNormal : TEXCOORD3; + float3 lightDirT : TEXCOORD5; + LIGHTING_COORDS(6,7) + }; + + v2f vert (appdata_t v) + { + v2f o; + o.pos = UnityObjectToClipPos(v.vertex); + + float3 vertexPos = mul(unity_ObjectToWorld, v.vertex).xyz; + o.viewDist = distance(vertexPos,_WorldSpaceCameraPos); + + float3 origin = mul(unity_ObjectToWorld, float4(0,0,0,1)).xyz; + + o.sphereNormal = -normalize(v.vertex); + o.worldNormal = normalize(mul( unity_ObjectToWorld, float4( v.normal, 0.0 ) ).xyz); + + TANGENT_SPACE_ROTATION; + o.lightDirT = normalize(mul(rotation, ObjSpaceLightDir(v.vertex))); + o.viewDirT = normalize(mul(rotation, ObjSpaceViewDir(v.vertex))); + TRANSFER_VERTEX_TO_FRAGMENT(o); + + return o; + } + + fixed4 frag (v2f IN) : COLOR + { + + half4 color; + float3 sphereNrm = IN.sphereNormal; + half4 main = GET_CUBE_MAP_1(_MainTex, IN.sphereNormal); + main = ALPHA_COLOR_1(main); + + //half3 normT = UnpackNormal(GET_CUBE_MAP_1(_BumpMap, IN.sphereNormal)); // wrong highlight position + // Don't know. Just copied UnpackNormal code here. "Sometimes it doesn't just work" i guess? + half4 normPacked = GET_CUBE_MAP_1(_BumpMap, IN.sphereNormal); + half3 normT; + #if ( defined(SHADER_API_GLES) || defined(SHADER_API_MOBILE) ) + normT = normPacked.xyz * 2 - 1; + #else + normT.xy = normPacked.wy * 2 - 1; + normT.z = sqrt(1 - normT.x*normT.x - normT.y * normT.y); + #endif + + half4 detail = GetCubeDetailMap(_midTex, IN.sphereNormal, _DetailScale); + + #ifdef CITYOVERLAY_ON + half4 cityoverlay = GET_CUBE_MAP_1(_CityOverlayTex, IN.sphereNormal); + cityoverlay = ALPHA_COLOR_1(cityoverlay); + half4 citydarkoverlaydetail = GetCubeDetailMap(_CityDarkOverlayDetailTex, IN.sphereNormal, _CityOverlayDetailScale); + half4 citylightoverlaydetail = GetCubeDetailMap(_CityLightOverlayDetailTex, IN.sphereNormal, _CityOverlayDetailScale); + #endif + + half detailLevel = saturate(2*_DetailDist*IN.viewDist); + // decrease detail opacity with brightness + half detailOpacity = _DetailOpacityMax - (_DetailOpacityMax - _DetailOpacityMin)*0.333333*(main.r + main.g + main.b); + // not show details on the ocean + #ifdef OCEAN_ON + color = main.rgba * lerp(lerp(1, detail.rgba, detailOpacity), 1, lerp(detailLevel, 1, main.a)); + #else + color = main.rgba * lerp(lerp(1, detail.rgba, detailOpacity), 1, detailLevel); + #endif + #ifdef CITYOVERLAY_ON + cityoverlay.a *= 1-step(1, main.a); + //cityoverlay.a = 1-step(cityoverlay.a, 0); + citydarkoverlaydetail.a *= cityoverlay.a; + citylightoverlaydetail.a *= cityoverlay.a; + color = lerp(color, citylightoverlaydetail, citylightoverlaydetail.a); + #endif + + color *= _Color; + + //lighting + half4 specColor = _SpecularColor; + #ifdef OCEAN_ON + specColor.a = main.a; + #endif + + color = SpecularColorLight( IN.lightDirT, IN.viewDirT, normT, color, specColor, _SpecularPower, LIGHT_ATTENUATION(IN) ); + + #ifdef OCEAN_ON + color *= lerp(Terminator( normalize(_WorldSpaceLightPos0), IN.worldNormal), 1, main.a); + #else + color *= Terminator( normalize(_WorldSpaceLightPos0), IN.worldNormal); + #endif + + #ifdef CITYOVERLAY_ON + //half lightIntensity = saturate(_LightColor0.a * (NdotL - 0.01) / 0.99 * 4 * atten); + citydarkoverlaydetail.a *= 1-saturate(color.a); + color.rgb = lerp(color.rgb, citydarkoverlaydetail.rgb, citydarkoverlaydetail.a); + #endif + + return color; + + } + + ENDCG - half detailLevel = saturate(2*_DetailDist*IN.viewDist); - color = main.rgba * lerp(detail.rgba, 1, detailLevel); - #ifdef CITYOVERLAY_ON - cityoverlay.a *= 1-step(1, main.a); - //cityoverlay.a = 1-step(cityoverlay.a, 0); - citydarkoverlaydetail.a *= cityoverlay.a; - citylightoverlaydetail.a *= cityoverlay.a; - color = lerp(color, citylightoverlaydetail, citylightoverlaydetail.a); - #endif - - color *= _Color; - - //lighting - half4 specColor = _SpecularColor; - #ifdef OCEAN_ON - specColor.a = main.a; - #endif - - color = SpecularColorLight( IN.lightDirT, IN.viewDirT, normT, color, specColor, _SpecularPower, LIGHT_ATTENUATION(IN) ); - - #ifdef OCEAN_ON - color *= lerp(Terminator( normalize(_WorldSpaceLightPos0), IN.worldNormal), 1, main.a); - #else - color *= Terminator( normalize(_WorldSpaceLightPos0), IN.worldNormal); - #endif - - #ifdef CITYOVERLAY_ON - //half lightIntensity = saturate(_LightColor0.a * (NdotL - 0.01) / 0.99 * 4 * atten); - citydarkoverlaydetail.a *= 1-saturate(color.a); - color.rgb = lerp(color.rgb, citydarkoverlaydetail.rgb, citydarkoverlaydetail.a); - #endif - - return color; - } - ENDCG - } - + } - + FallBack "VertexLit" -} \ No newline at end of file + +} diff --git a/Terrain/TerrainObject.cs b/Terrain/TerrainObject.cs index 47ecea52..96f8f134 100644 --- a/Terrain/TerrainObject.cs +++ b/Terrain/TerrainObject.cs @@ -31,10 +31,14 @@ public class TerrainMaterial : MaterialManager float _DetailVertScale = 200f; [ConfigItem] float _DetailDist = 0.00875f; + [ConfigItem] + float _DetailOpacityMin = 0.1f; + [ConfigItem] + float _DetailOpacityMax = 1.0f; [ConfigItem] float _MinLight = 0f; [ConfigItem] - Color _SpecularColor = Color.grey; + Color _SpecularColor = 256 * Color.grey; [ConfigItem] float _SpecularPower = 51.2f; [ConfigItem] diff --git a/Terrain/TerrainPQS.cs b/Terrain/TerrainPQS.cs index 2b03b083..54f649d9 100644 --- a/Terrain/TerrainPQS.cs +++ b/Terrain/TerrainPQS.cs @@ -22,6 +22,7 @@ public class TerrainPQS : PQSMod GameObject OceanBacking = null; Material OceanBackingMaterial; Material OceanSurfaceMaterial; + private Material pqsSurfaceMaterial; public override void OnSphereActive() { @@ -43,9 +44,9 @@ protected void Update() if (this.sphere.isActiveAndEnabled && celestialBody != null) { Vector3 sunDir = this.celestialBody.transform.InverseTransformDirection(Sun.Instance.sunDirection); - this.celestialBody.pqsController.surfaceMaterial.SetVector(ShaderProperties.SUNDIR_PROPERTY, sunDir); + pqsSurfaceMaterial.SetVector(ShaderProperties.SUNDIR_PROPERTY, sunDir); Vector3 planetOrigin = this.celestialBody.transform.position; - this.celestialBody.pqsController.surfaceMaterial.SetVector(ShaderProperties.PLANET_ORIGIN_PROPERTY, planetOrigin); + pqsSurfaceMaterial.SetVector(ShaderProperties.PLANET_ORIGIN_PROPERTY, planetOrigin); if (OceanBackingMaterial != null) { OceanBackingMaterial.SetVector(ShaderProperties.PLANET_ORIGIN_PROPERTY, planetOrigin); @@ -63,6 +64,7 @@ internal void Apply(string body, TerrainMaterial terrainMaterial, OceanMaterial if (celestialBody != null && celestialBody.pqsController != null) { pqs = celestialBody.pqsController; + pqsSurfaceMaterial = GetPQSSurfaceMaterial(pqs); } else { @@ -93,38 +95,47 @@ internal void Apply(string body, TerrainMaterial terrainMaterial, OceanMaterial TerrainManager.Log("planet shader: " + r.material.shader); r.sharedMaterial.shader = TerrainManager.PlanetShader; terrainMaterial.ApplyMaterialProperties(r.sharedMaterial); - + // terrainMaterial doesn't work anyway [1/3] + if (pqs.ChildSpheres.Length != 0) + { + r.sharedMaterial.EnableKeyword("OCEAN_ON"); + } else { + r.sharedMaterial.DisableKeyword("OCEAN_ON"); + } } - terrainMaterial.SaveTextures(pqs.surfaceMaterial); - originalTerrainShader = pqs.surfaceMaterial.shader; + // terrainMaterial doesn't work anyway [2/3] + //terrainMaterial = null; + //originalTerrainShader = null; + + terrainMaterial.SaveTextures(pqsSurfaceMaterial); + originalTerrainShader = pqsSurfaceMaterial.shader; TerrainManager.Log("Terrain Shader Name: " + originalTerrainShader.name); - String[] keywords = pqs.surfaceMaterial.shaderKeywords; - pqs.surfaceMaterial.shader = TerrainManager.TerrainShader; - /* foreach (String keyword in keywords) - { - pqs.surfaceMaterial.EnableKeyword(keyword); - } - */ - terrainMaterial.ApplyMaterialProperties(pqs.surfaceMaterial); + String[] keywords = pqsSurfaceMaterial.shaderKeywords; + pqsSurfaceMaterial.shader = TerrainManager.TerrainShader; + // foreach (String keyword in keywords) + // { + // pqs.surfaceMaterial.EnableKeyword(keyword); + // } + terrainMaterial.ApplyMaterialProperties(pqsSurfaceMaterial); if (oceanMaterial != null && pqs.ChildSpheres.Length > 0) { PQS ocean = pqs.ChildSpheres[0]; - OceanSurfaceMaterial = ocean.surfaceMaterial; + OceanSurfaceMaterial = GetPQSSurfaceMaterial(ocean); - pqs.surfaceMaterial.EnableKeyword("OCEAN_ON"); + pqsSurfaceMaterial.EnableKeyword("OCEAN_ON"); r.sharedMaterial.EnableKeyword("OCEAN_ON"); keywords = OceanSurfaceMaterial.shaderKeywords; originalOceanShader = OceanSurfaceMaterial.shader; TerrainManager.Log("Ocean Shader Name: " + originalOceanShader.name); OceanSurfaceMaterial.shader = TerrainManager.OceanShader; - /* foreach (String keyword in keywords) - { - OceanSurfaceMaterial.EnableKeyword(keyword); - } - */ + // foreach (String keyword in keywords) + // { + // OceanSurfaceMaterial.EnableKeyword(keyword); + // } + terrainMaterial.ApplyMaterialProperties(OceanSurfaceMaterial); oceanMaterial.ApplyMaterialProperties(OceanSurfaceMaterial); @@ -142,18 +153,12 @@ internal void Apply(string body, TerrainMaterial terrainMaterial, OceanMaterial } } - /* - - PQS ocean = - sphere.ChildSpheres[0]; - GameObject go = new GameObject(); - FakeOceanPQS fakeOcean = go.AddComponent(); - fakeOcean.Apply(ocean); - - - */ - + // PQS ocean = + // sphere.ChildSpheres[0]; + // GameObject go = new GameObject(); + // FakeOceanPQS fakeOcean = go.AddComponent(); + // fakeOcean.Apply(ocean); } @@ -170,20 +175,21 @@ internal void Apply(string body, TerrainMaterial terrainMaterial, OceanMaterial } else { - pqs.surfaceMaterial.DisableKeyword("OCEAN_ON"); - r.sharedMaterial.DisableKeyword("OCEAN_ON"); + pqsSurfaceMaterial.DisableKeyword("OCEAN_ON"); + //r.sharedMaterial.DisableKeyword("OCEAN_ON"); // terrainMaterial doesn't work anyway [3/3] } + PQSMod_CelestialBodyTransform cbt = (PQSMod_CelestialBodyTransform)pqs.transform.GetComponentInChildren(typeof(PQSMod_CelestialBodyTransform)); if (cbt != null) { - pqs.surfaceMaterial.SetFloat("_MainTexHandoverDist", (float)(1f / cbt.deactivateAltitude)); + pqsSurfaceMaterial.SetFloat("_MainTexHandoverDist", (float)(1f / cbt.deactivateAltitude)); if (oceanMaterial != null && pqs.ChildSpheres.Length > 0) { PQS ocean = pqs.ChildSpheres[0]; OceanSurfaceMaterial.SetFloat("_MainTexHandoverDist", (float)(1f / cbt.deactivateAltitude)); } - pqs.surfaceMaterial.SetFloat("_OceanRadius", (float)celestialBody.Radius); + pqsSurfaceMaterial.SetFloat("_OceanRadius", (float)celestialBody.Radius); } } @@ -204,5 +210,32 @@ internal void Remove() OceanBacking = null; } } + + private static Material GetPQSSurfaceMaterial(PQS pqs) + { + switch (GameSettings.TERRAIN_SHADER_QUALITY) + { + case 0: + if (pqs.lowQualitySurfaceMaterial != null) + { + return pqs.lowQualitySurfaceMaterial; + } + break; + case 1: + if (pqs.mediumQualitySurfaceMaterial != null) + { + return pqs.mediumQualitySurfaceMaterial; + } + break; + case 2: + if (pqs.highQualitySurfaceMaterial != null) + { + return pqs.highQualitySurfaceMaterial; + } + break; + } + return pqs.surfaceMaterial; + } + } } diff --git a/Utils/MaterialManager.cs b/Utils/MaterialManager.cs index 2653976c..8a047b0d 100644 --- a/Utils/MaterialManager.cs +++ b/Utils/MaterialManager.cs @@ -258,10 +258,10 @@ private void CloneToBuffer(Material mat, CommandBuffer buf) public void SaveTextures(Material material) { Cache(); - List keys = cache.Keys.Select(x=>(string)x).ToList(); - foreach (String key in keys) + List keys = cache.Keys.Select(x=>(object)x).ToList(); + foreach (object key in keys) { - String name = key; + String name = key.ToString(); object obj = cache[key]; if ( obj == null ) From 6453744ae60ce17c98a6a5e650a8b1fab57bcb1a Mon Sep 17 00:00:00 2001 From: R-T-B <21GunSoftware@comcast.net> Date: Tue, 11 Aug 2020 08:06:37 -0700 Subject: [PATCH 19/26] Forgot the version... --- _BuildManager/Properties/AssemblyVersionInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_BuildManager/Properties/AssemblyVersionInfo.cs b/_BuildManager/Properties/AssemblyVersionInfo.cs index e911e5f4..3bb12944 100644 --- a/_BuildManager/Properties/AssemblyVersionInfo.cs +++ b/_BuildManager/Properties/AssemblyVersionInfo.cs @@ -13,4 +13,4 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.8.0.2")] // KSP version with EVE release number appended; see also CKAN version file. +[assembly: AssemblyVersion("1.10.1.1")] // KSP version with EVE release number appended; see also CKAN version file. From 1fc578b11e0d3fe2b98cf98a106c066cce997cc5 Mon Sep 17 00:00:00 2001 From: R-T-B <21GunSoftware@comcast.net> Date: Tue, 18 Aug 2020 16:53:45 -0700 Subject: [PATCH 20/26] Update Version. --- .../EnvironmentalVisualEnhancements.version | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ContentEVE/GameData/EnvironmentalVisualEnhancements/EnvironmentalVisualEnhancements.version b/ContentEVE/GameData/EnvironmentalVisualEnhancements/EnvironmentalVisualEnhancements.version index c6742e81..3857db50 100644 --- a/ContentEVE/GameData/EnvironmentalVisualEnhancements/EnvironmentalVisualEnhancements.version +++ b/ContentEVE/GameData/EnvironmentalVisualEnhancements/EnvironmentalVisualEnhancements.version @@ -1,7 +1,7 @@ { "NAME": "Environmental Visual Enhancements", - "URL": "https://github.com/WazWaz/EnvironmentalVisualEnhancements/raw/master/ContentEVE/GameData/EnvironmentalVisualEnhancements/EnvironmentalVisualEnhancements.version", - "DOWNLOAD" : "https://github.com/WazWaz/EnvironmentalVisualEnhancements/releases", + "URL": "https://github.com/R-T-B/EnvironmentalVisualEnhancements/raw/master/ContentEVE/GameData/EnvironmentalVisualEnhancements/EnvironmentalVisualEnhancements.version", + "DOWNLOAD" : "https://github.com/R-T-B/EnvironmentalVisualEnhancements/releases", "GITHUB": { "USERNAME": "WazWaz", "REPOSITORY": "EnvironmentalVisualEnhancements", @@ -9,23 +9,23 @@ }, "VERSION": { "MAJOR": 1, - "MINOR": 8, - "PATCH": 0, - "BUILD": 2 + "MINOR": 10, + "PATCH": 1, + "BUILD": 1 }, "KSP_VERSION": { "MAJOR": 1, - "MINOR": 8, - "PATCH": 0 + "MINOR": 10, + "PATCH": 1 }, "KSP_VERSION_MIN": { "MAJOR": 1, - "MINOR": 8, + "MINOR": 9, "PATCH": 0 }, "KSP_VERSION_MAX": { "MAJOR": 1, - "MINOR": 8, + "MINOR": 10, "PATCH": 99 } } From df78461c931afb13d1919254867c4c8f379a1d17 Mon Sep 17 00:00:00 2001 From: lghassen Date: Wed, 19 Aug 2020 19:31:44 +0200 Subject: [PATCH 21/26] tagging my build in this great tradition --- _BuildManager/_BuildManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_BuildManager/_BuildManager.cs b/_BuildManager/_BuildManager.cs index c8fa77d9..c17cbc76 100644 --- a/_BuildManager/_BuildManager.cs +++ b/_BuildManager/_BuildManager.cs @@ -42,7 +42,7 @@ private void logVersion() String location = Path.GetDirectoryName(buildManager.Location); List assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(x => Path.GetDirectoryName(x.Location) == location).Select(x => x.GetName()).ToList(); - String versionInfo = "[EVE] Version Info:\n"; + String versionInfo = "[BLACKRACK_EVE_REDUX] Version Info:\n"; foreach (AssemblyName assembly in assemblies) { versionInfo+=assembly.Name + ", " + assembly.Version.ToString() + "\n"; From fd8df950caf14b1906fe885b85321f880c8ba1e6 Mon Sep 17 00:00:00 2001 From: lghassen Date: Wed, 19 Aug 2020 20:28:18 +0200 Subject: [PATCH 22/26] one final fix to cloud renderqueue --- Assets/Shaders/CloudVolumeParticle.shader | 2 +- Assets/Shaders/CompositeDeferredClouds.shader | 2 +- Assets/Shaders/SphereCloud.shader | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Shaders/CloudVolumeParticle.shader b/Assets/Shaders/CloudVolumeParticle.shader index b6bc76b1..b8ede166 100644 --- a/Assets/Shaders/CloudVolumeParticle.shader +++ b/Assets/Shaders/CloudVolumeParticle.shader @@ -26,7 +26,7 @@ Shader "EVE/GeometryCloudVolumeParticleToTexture" { Category { - Tags { "Queue"="Transparent+2" "IgnoreProjector"="True" "RenderType"="Transparent" "DisableBatching"="True" } + Tags { "Queue"="Transparent-1" "IgnoreProjector"="True" "RenderType"="Transparent" "DisableBatching"="True" } //Blend SrcAlpha OneMinusSrcAlpha Blend SrcAlpha OneMinusSrcAlpha, Zero OneMinusSrcAlpha //traditional alpha blending for colors, multiply by (1-alpha) for alpha to store in texture Fog { Mode Global} diff --git a/Assets/Shaders/CompositeDeferredClouds.shader b/Assets/Shaders/CompositeDeferredClouds.shader index f13f1ea0..2e17b0b1 100644 --- a/Assets/Shaders/CompositeDeferredClouds.shader +++ b/Assets/Shaders/CompositeDeferredClouds.shader @@ -5,7 +5,7 @@ Shader "EVE/CompositeDeferredClouds" { } SubShader{ - Tags { "Queue"="Transparent+2" "IgnoreProjector"="True" "RenderType"="Transparent"} + Tags { "Queue"="Transparent-1" "IgnoreProjector"="True" "RenderType"="Transparent"} Pass { Blend SrcAlpha OneMinusSrcAlpha ZWrite Off diff --git a/Assets/Shaders/SphereCloud.shader b/Assets/Shaders/SphereCloud.shader index 6eb19527..284d833c 100644 --- a/Assets/Shaders/SphereCloud.shader +++ b/Assets/Shaders/SphereCloud.shader @@ -34,7 +34,7 @@ Shader "EVE/Cloud" { Category{ - Tags { "Queue" = "Transparent+1" "IgnoreProjector" = "True" "RenderType" = "Transparent" } + Tags { "Queue" = "Transparent-2" "IgnoreProjector" = "True" "RenderType" = "Transparent" } Blend SrcAlpha OneMinusSrcAlpha Fog { Mode Global} AlphaTest Greater 0 From 38e431180898bd8ffeaf71c9fd0ae655e9619139 Mon Sep 17 00:00:00 2001 From: lghassen Date: Tue, 25 Aug 2020 20:13:15 +0200 Subject: [PATCH 23/26] commit local setup --- Assembly-CSharp-Editor.csproj | 417 ++++++++++++----------- Assets/Editor/BuildABs.cs | 8 +- Atmosphere/Atmosphere.csproj | 4 - CelestialShadows/CelestialShadows.csproj | 4 - CityLights/CityLights.csproj | 4 - EnvironmentalVisualEnhancements.sln | 11 +- EveManager/EveManager.csproj | 4 - LocalSetup.csproj | 2 + PQSManager/PQSManager.csproj | 4 - PartFX/PartFX.csproj | 6 +- ShaderLoader/ShaderLoader.csproj | 5 +- Terrain/Terrain.csproj | 5 +- TextureConfig/TextureConfig.csproj | 5 +- Utils/Utils.csproj | 5 +- _BuildManager/_BuildManager.csproj | 5 - 15 files changed, 226 insertions(+), 263 deletions(-) diff --git a/Assembly-CSharp-Editor.csproj b/Assembly-CSharp-Editor.csproj index df3195ea..90cd68d3 100644 --- a/Assembly-CSharp-Editor.csproj +++ b/Assembly-CSharp-Editor.csproj @@ -2,20 +2,22 @@ latest - C:\Program Files\Unity\Hub\Editor\2019.2.9f1\Editor\Data\Tools\RoslynScripts + C:\Program Files\Unity2019.2\Editor\Data\Tools\RoslynScripts unity_csc.bat + Debug AnyCPU 10.0.20506 2.0 - + + {37FDEF94-F268-61DE-86B0-D704F4A83E6D} Library Properties Assembly-CSharp-Editor - v4.7.1 + v4.6.1 512 . @@ -24,7 +26,7 @@ full false Temp\bin\Debug\ - DEBUG;TRACE;UNITY_2019_2_9;UNITY_2019_2;UNITY_2019;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_INCLUDE_TESTS;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;INCLUDE_DYNAMIC_GI;ENABLE_MONO_BDWGC;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_VIDEO;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER + DEBUG;TRACE;UNITY_2019_2_21;UNITY_2019_2;UNITY_2019;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;INCLUDE_DYNAMIC_GI;ENABLE_MONO_BDWGC;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_VIDEO;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER prompt 4 0169 @@ -46,605 +48,604 @@ false false - - {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Unity/VSTU - Editor:5 - StandaloneWindows:5 - 2019.2.9f1 - - C:\Program Files\Unity\Hub\Editor\2019.2.9f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll + C:\Program Files\Unity2019.2\Editor\Data\Managed/UnityEngine/UnityEngine.dll - C:\Program Files\Unity\Hub\Editor\2019.2.9f1\Editor\Data\Managed/UnityEditor.dll + C:\Program Files\Unity2019.2\Editor\Data\Managed/UnityEditor.dll + - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/UnityEditor.TestRunner.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/UnityEditor.TestRunner.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/UnityEngine.TestRunner.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/UnityEngine.TestRunner.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.Timeline.Editor.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.Timeline.Editor.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.VSCode.Editor.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.VSCode.Editor.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/UnityEngine.UI.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/UnityEngine.UI.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.Timeline.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.Timeline.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.Rider.Editor.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.Rider.Editor.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.TextMeshPro.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/Unity.TextMeshPro.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/UnityEditor.UI.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/ScriptAssemblies/UnityEditor.UI.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll + C:/Program Files/Unity2019.2/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Managed/UnityEditor.Graphs.dll + C:/Program Files/Unity2019.2/Editor/Data/Managed/UnityEditor.Graphs.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll + C:/Program Files/Unity2019.2/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll + + + C:/Program Files/Unity2019.2/Editor/Data/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll + + + C:/Program Files/Unity2019.2/Editor/Data/PlaybackEngines/MacStandaloneSupport/UnityEditor.OSXStandalone.Extensions.dll - - C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll + + C:/Program Files/Unity2019.2/Editor/Data/PlaybackEngines/LinuxStandaloneSupport/UnityEditor.LinuxStandalone.Extensions.dll - W:/Warwick/Documents/KSP/EnvironmentalVisualEnhancements/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll + C:/gh/scattererGithub/EVE/EnvironmentalVisualEnhancements/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Core.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Core.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Runtime.Serialization.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Runtime.Serialization.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.Linq.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.Vectors.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.Vectors.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Net.Http.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Net.Http.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Microsoft.CSharp.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Microsoft.CSharp.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Data.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Data.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/Microsoft.Win32.Primitives.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/Microsoft.Win32.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/netstandard.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/netstandard.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.AppContext.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.AppContext.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Concurrent.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Concurrent.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.NonGeneric.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.NonGeneric.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Specialized.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Specialized.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.EventBasedAsync.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.EventBasedAsync.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Primitives.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.TypeConverter.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.TypeConverter.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Console.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Console.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Data.Common.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Data.Common.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Contracts.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Contracts.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Debug.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Debug.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.FileVersionInfo.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.FileVersionInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Process.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Process.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.StackTrace.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.StackTrace.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TextWriterTraceListener.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TextWriterTraceListener.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Tools.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Tools.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TraceSource.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TraceSource.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Drawing.Primitives.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Drawing.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Dynamic.Runtime.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Dynamic.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Calendars.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Calendars.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Extensions.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Compression.ZipFile.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Compression.ZipFile.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.DriveInfo.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.DriveInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Primitives.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Watcher.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Watcher.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.IsolatedStorage.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.IsolatedStorage.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.MemoryMappedFiles.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.MemoryMappedFiles.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Pipes.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Pipes.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.UnmanagedMemoryStream.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.UnmanagedMemoryStream.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Expressions.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Expressions.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Parallel.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Queryable.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Queryable.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Http.Rtc.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Http.Rtc.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NameResolution.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NameResolution.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NetworkInformation.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NetworkInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Ping.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Ping.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Primitives.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Requests.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Requests.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Security.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Security.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Sockets.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Sockets.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebHeaderCollection.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebHeaderCollection.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.Client.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.Client.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ObjectModel.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ObjectModel.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.ILGeneration.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.ILGeneration.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.Lightweight.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.Lightweight.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Extensions.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Primitives.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Reader.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Reader.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.ResourceManager.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.ResourceManager.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Writer.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Writer.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.CompilerServices.VisualC.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.CompilerServices.VisualC.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Extensions.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Handles.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Handles.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.RuntimeInformation.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.RuntimeInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Numerics.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Formatters.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Formatters.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Json.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Json.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Primitives.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Xml.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Claims.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Claims.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Algorithms.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Algorithms.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Csp.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Csp.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Encoding.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Primitives.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.X509Certificates.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.X509Certificates.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Principal.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Principal.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.SecureString.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.SecureString.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Duplex.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Duplex.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Http.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Http.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.NetTcp.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.NetTcp.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Primitives.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Security.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Security.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.Extensions.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.RegularExpressions.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.RegularExpressions.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Overlapped.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Overlapped.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.Parallel.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Thread.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Thread.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.ThreadPool.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.ThreadPool.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Timer.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Timer.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ValueTuple.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ValueTuple.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.ReaderWriter.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.ReaderWriter.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XDocument.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlDocument.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlSerializer.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlSerializer.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.Lang.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.Lang.dll - C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll + C:/Program Files/Unity2019.2/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll -