From 983c51b4ac14bf6ca09a24dbc19f3bd9410b19d9 Mon Sep 17 00:00:00 2001 From: Reinier Vens Date: Sat, 29 May 2021 13:59:09 +0100 Subject: [PATCH] Hotfix --- Asset Sources/Zhestokost.png | 3 + Asset Sources/Zhestokost.psd | 3 + Assets/Materials/Grid 1.mat | 128 +++++ Assets/Materials/Grid 1.mat.meta | 8 + Assets/Materials/UI/Map Gravity Lines.mat | 2 +- Assets/Scenes/ARPG.unity | 4 +- Assets/Shaders/Compute/Slime/Slime.cs | 13 +- Assets/Shaders/Terrain.meta | 8 + .../Shaders/Terrain/My Lighting Input.cginc | 255 +++++++++ .../Terrain/My Lighting Input.cginc.meta | 9 + Assets/Shaders/Terrain/My Lighting.cginc | 516 ++++++++++++++++++ Assets/Shaders/Terrain/My Lighting.cginc.meta | 9 + Assets/Shaders/Terrain/My Shadows.cginc | 146 +++++ Assets/Shaders/Terrain/My Shadows.cginc.meta | 9 + Assets/Shaders/Terrain/MyTessellation.cginc | 142 +++++ .../Shaders/Terrain/MyTessellation.cginc.meta | 9 + .../Terrain/Tessellation Shader.shader | 207 +++++++ .../Terrain/Tessellation Shader.shader.meta | 9 + Assets/Textures/DisplacementFlat.tga | 3 + Assets/Textures/DisplacementFlat.tga.meta | 96 ++++ Assets/Textures/DisplacementSharp.tga | 3 + Assets/Textures/DisplacementSharp.tga.meta | 96 ++++ Assets/Textures/DisplacementSmooth.tga | 3 + Assets/Textures/DisplacementSmooth.tga.meta | 96 ++++ .../Sprites => Textures}/Gamecult logo.png | 0 .../Gamecult logo.png.meta | 20 +- Assets/Textures/Hex0.png | 3 + Assets/Textures/Hex0.png.meta | 96 ++++ Assets/Textures/Hex1.png | 3 + Assets/Textures/Hex1.png.meta | 96 ++++ .../Sprites => Textures}/asteroids.png | 0 .../Sprites => Textures}/asteroids.png.meta | 0 .../Sprites => Textures}/starfield.jpg | 0 .../Sprites => Textures}/starfield.jpg.meta | 0 .../Sprites => Textures}/stripe.png | 0 .../Sprites => Textures}/stripe.png.meta | 0 .../Windows/x86/DSP/AkSoundSeedAir.dll.meta | 2 +- .../Windows/x86/DSP/AkSoundSeedGrain.dll.meta | 2 +- .../Windows/x86/DSP/AkSynthOne.dll.meta | 2 +- .../Plugins/Windows/x86/DSP/McDSP.dll.meta | 2 +- .../Plugins/Windows/x86/DSP/iZotope.dll.meta | 2 +- .../x86/Profile/AkSoundEngine.dll.meta | 2 +- .../x86_64/DSP/AkSoundSeedAir.dll.meta | 2 +- .../x86_64/DSP/AkSoundSeedGrain.dll.meta | 2 +- .../Windows/x86_64/DSP/AkSynthOne.dll.meta | 2 +- .../Plugins/Windows/x86_64/DSP/McDSP.dll.meta | 2 +- .../Windows/x86_64/DSP/iZotope.dll.meta | 2 +- .../x86_64/Profile/AkSoundEngine.dll.meta | 2 +- .../Locations/{Corvus6.ink => Corvus6.ink2} | 0 GameData/PlayerSettings.msgpack | 4 +- 50 files changed, 2000 insertions(+), 23 deletions(-) create mode 100644 Asset Sources/Zhestokost.png create mode 100644 Asset Sources/Zhestokost.psd create mode 100644 Assets/Materials/Grid 1.mat create mode 100644 Assets/Materials/Grid 1.mat.meta create mode 100644 Assets/Shaders/Terrain.meta create mode 100644 Assets/Shaders/Terrain/My Lighting Input.cginc create mode 100644 Assets/Shaders/Terrain/My Lighting Input.cginc.meta create mode 100644 Assets/Shaders/Terrain/My Lighting.cginc create mode 100644 Assets/Shaders/Terrain/My Lighting.cginc.meta create mode 100644 Assets/Shaders/Terrain/My Shadows.cginc create mode 100644 Assets/Shaders/Terrain/My Shadows.cginc.meta create mode 100644 Assets/Shaders/Terrain/MyTessellation.cginc create mode 100644 Assets/Shaders/Terrain/MyTessellation.cginc.meta create mode 100644 Assets/Shaders/Terrain/Tessellation Shader.shader create mode 100644 Assets/Shaders/Terrain/Tessellation Shader.shader.meta create mode 100644 Assets/Textures/DisplacementFlat.tga create mode 100644 Assets/Textures/DisplacementFlat.tga.meta create mode 100644 Assets/Textures/DisplacementSharp.tga create mode 100644 Assets/Textures/DisplacementSharp.tga.meta create mode 100644 Assets/Textures/DisplacementSmooth.tga create mode 100644 Assets/Textures/DisplacementSmooth.tga.meta rename Assets/{Resources/Sprites => Textures}/Gamecult logo.png (100%) rename Assets/{Resources/Sprites => Textures}/Gamecult logo.png.meta (85%) create mode 100644 Assets/Textures/Hex0.png create mode 100644 Assets/Textures/Hex0.png.meta create mode 100644 Assets/Textures/Hex1.png create mode 100644 Assets/Textures/Hex1.png.meta rename Assets/{Resources/Sprites => Textures}/asteroids.png (100%) rename Assets/{Resources/Sprites => Textures}/asteroids.png.meta (100%) rename Assets/{Resources/Sprites => Textures}/starfield.jpg (100%) rename Assets/{Resources/Sprites => Textures}/starfield.jpg.meta (100%) rename Assets/{Resources/Sprites => Textures}/stripe.png (100%) rename Assets/{Resources/Sprites => Textures}/stripe.png.meta (100%) rename GameData/Narrative/Locations/{Corvus6.ink => Corvus6.ink2} (100%) diff --git a/Asset Sources/Zhestokost.png b/Asset Sources/Zhestokost.png new file mode 100644 index 000000000..5f35ba9ba --- /dev/null +++ b/Asset Sources/Zhestokost.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31a93ba3d727b46489acdc9318f03a35108d7d05b4c2fd43adf00728c1c13dc8 +size 8084300 diff --git a/Asset Sources/Zhestokost.psd b/Asset Sources/Zhestokost.psd new file mode 100644 index 000000000..e1f572e80 --- /dev/null +++ b/Asset Sources/Zhestokost.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67bc6406e4967401e0315c55e8083bd86f0f7120d55bb3a0521964163d9e0fc3 +size 47844837 diff --git a/Assets/Materials/Grid 1.mat b/Assets/Materials/Grid 1.mat new file mode 100644 index 000000000..5bcfd338f --- /dev/null +++ b/Assets/Materials/Grid 1.mat @@ -0,0 +1,128 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Grid 1 + m_Shader: {fileID: 4800000, guid: 715b1ce444e57364a9458657be896071, type: 3} + m_ShaderKeywords: _RENDERING_CUTOUT _TESSELLATION_EDGE + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2450 + stringTagMap: + RenderType: TransparentCutout + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaMask: + m_Texture: {fileID: 2800000, guid: 314e63bcb8ac19045b9577f68a24bb42, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Background: + m_Texture: {fileID: 8900000, guid: b607eb85a346eaf459b28449d909bbe5, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DispTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DisplacementMap: + m_Texture: {fileID: 8400000, guid: 2fc21a9d3e9647948b56e384cd9378b3, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaClip: 0.4 + - _AlphaRange: 80 + - _AlphaRangeCenter: -100 + - _AlphaRangeFeather: 10 + - _AlphaTiling: 0.5 + - _BackgroundBlur: 0.75 + - _BackgroundFresnel: 0.999 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailBumpScale: 1 + - _DetailNormalMapScale: 1 + - _Displacement: 1 + - _DisplacementStep: 1.5 + - _DisplacementStrength: -1 + - _DstBlend: 0 + - _Emission: 2 + - _EmissionFresnel: 0.8 + - _FresnelClip: 10 + - _FresnelClipOffset: 0 + - _FresnelClipPower: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ParallaxStrength: 0 + - _Smoothness: 1 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _TessellationEdgeLength: 5 + - _TessellationUniform: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.53009, g: 0.74321616, b: 0.79, a: 1} + - _Emission: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 0.46091864, g: 0.21568628, b: 0.4627451, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Grid 1.mat.meta b/Assets/Materials/Grid 1.mat.meta new file mode 100644 index 000000000..101d5a13f --- /dev/null +++ b/Assets/Materials/Grid 1.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 493bb263313ccb54493188c33eaf150c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/UI/Map Gravity Lines.mat b/Assets/Materials/UI/Map Gravity Lines.mat index 7fed096ef..4ac4d5dfd 100644 --- a/Assets/Materials/UI/Map Gravity Lines.mat +++ b/Assets/Materials/UI/Map Gravity Lines.mat @@ -86,7 +86,7 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _Scale: 0.4329686 + - _Scale: 0.7614405 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 diff --git a/Assets/Scenes/ARPG.unity b/Assets/Scenes/ARPG.unity index 8cfa0fdde..129b7e116 100644 --- a/Assets/Scenes/ARPG.unity +++ b/Assets/Scenes/ARPG.unity @@ -17015,7 +17015,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &1066823974 Transform: m_ObjectHideFlags: 0 @@ -19840,7 +19840,7 @@ PrefabInstance: - target: {fileID: 6977256487485077368, guid: efd1f097ce29ffa48bb0045d6502f55d, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 6977256487485077373, guid: efd1f097ce29ffa48bb0045d6502f55d, type: 3} diff --git a/Assets/Shaders/Compute/Slime/Slime.cs b/Assets/Shaders/Compute/Slime/Slime.cs index e10a195e2..ffd067938 100644 --- a/Assets/Shaders/Compute/Slime/Slime.cs +++ b/Assets/Shaders/Compute/Slime/Slime.cs @@ -262,8 +262,19 @@ public class Slime : MonoBehaviour private void OnDisable() { - _accumulationTexture.Release(); _agentsBuffer.Release(); + _accumulationTexture.Release(); + _previousAccumulationTexture.Release(); + + _spawnBuffer.Release(); + _parameterBuffer.Release(); + _particlesBuffer.Release(); + + _trailBuffer.Release(); + _trailPreviousBuffer.Release(); + + _indexBuffer.Release(); + _vertexBuffer.Release(); } } diff --git a/Assets/Shaders/Terrain.meta b/Assets/Shaders/Terrain.meta new file mode 100644 index 000000000..974045fc5 --- /dev/null +++ b/Assets/Shaders/Terrain.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6eabf230ec4fda34784c8ed95c5e8f88 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Terrain/My Lighting Input.cginc b/Assets/Shaders/Terrain/My Lighting Input.cginc new file mode 100644 index 000000000..cea57b0bc --- /dev/null +++ b/Assets/Shaders/Terrain/My Lighting Input.cginc @@ -0,0 +1,255 @@ +// Upgrade NOTE: upgraded instancing buffer 'InstanceProperties' to new syntax. + +#if !defined(MY_LIGHTING_INPUT_INCLUDED) +#define MY_LIGHTING_INPUT_INCLUDED + +#include "UnityPBSLighting.cginc" +#include "AutoLight.cginc" + +#define TESSELLATION_TANGENT 1 +#define TESSELLATION_UV1 1 +#define TESSELLATION_UV2 1 + +#if defined(_PARALLAX_MAP) && defined(VERTEX_DISPLACEMENT_INSTEAD_OF_PARALLAX) + #undef _PARALLAX_MAP + #define VERTEX_DISPLACEMENT 1 +#endif + +#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2) + #if !defined(FOG_DISTANCE) + #define FOG_DEPTH 1 + #endif + #define FOG_ON 1 +#endif + +#if !defined(LIGHTMAP_ON) && defined(SHADOWS_SCREEN) + #if defined(SHADOWS_SHADOWMASK) && !defined(UNITY_NO_SCREENSPACE_SHADOWS) + #define ADDITIONAL_MASKED_DIRECTIONAL_SHADOWS 1 + #endif +#endif + +#if defined(LIGHTMAP_ON) && defined(SHADOWS_SCREEN) + #if defined(LIGHTMAP_SHADOW_MIXING) && !defined(SHADOWS_SHADOWMASK) + #define SUBTRACTIVE_LIGHTING 1 + #endif +#endif + +UNITY_INSTANCING_BUFFER_START(InstanceProperties) + UNITY_DEFINE_INSTANCED_PROP(float4, _Color) +#define _Color_arr InstanceProperties +UNITY_INSTANCING_BUFFER_END(InstanceProperties) + +sampler2D _MainTex, _DetailTex, _DetailMask; +float4 _MainTex_ST, _DetailTex_ST; + +sampler2D _NormalMap, _DetailNormalMap; +float _BumpScale, _DetailBumpScale; + +sampler2D _MetallicMap; +float _Metallic; +float _Smoothness; + +sampler2D _DisplacementMap; +float4 _DisplacementMap_TexelSize; +float _DisplacementStrength; +float _DisplacementStep; + +sampler2D _AlphaMask; +float _FresnelClip; +float _FresnelClipPower; +float _FresnelClipOffset; +float _AlphaClip; +float _AlphaRange; +float _AlphaRangeFeather; +float _AlphaRangeCenter; +float _AlphaTiling; + +sampler2D _OcclusionMap; +float _OcclusionStrength; + +samplerCUBE _Background; +sampler2D _EmissionMap; +float _Emission; +half4 _EmissionColor; +float _EmissionFresnel; +float _BackgroundBlur; +float _BackgroundFresnel; + +float _Cutoff; + +struct VertexData { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 vertex : POSITION; + float3 normal : NORMAL; + float4 tangent : TANGENT; + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float2 uv2 : TEXCOORD2; +}; + +struct InterpolatorsVertex { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 pos : SV_POSITION; + float4 uv : TEXCOORD0; + float3 normal : TEXCOORD1; + + #if defined(BINORMAL_PER_FRAGMENT) + float4 tangent : TEXCOORD2; + #else + float3 tangent : TEXCOORD2; + float3 binormal : TEXCOORD3; + #endif + + #if FOG_DEPTH + float4 worldPos : TEXCOORD4; + #else + float3 worldPos : TEXCOORD4; + #endif + + UNITY_SHADOW_COORDS(5) + + #if defined(VERTEXLIGHT_ON) + float3 vertexLightColor : TEXCOORD6; + #endif + + #if defined(LIGHTMAP_ON) || ADDITIONAL_MASKED_DIRECTIONAL_SHADOWS + float2 lightmapUV : TEXCOORD6; + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float2 dynamicLightmapUV : TEXCOORD7; + #endif + + #if defined(_PARALLAX_MAP) + float3 tangentViewDir : TEXCOORD8; + #endif +}; + +struct Interpolators { + UNITY_VERTEX_INPUT_INSTANCE_ID + #if defined(LOD_FADE_CROSSFADE) + UNITY_VPOS_TYPE vpos : VPOS; + #else + float4 pos : SV_POSITION; + #endif + + float4 uv : TEXCOORD0; + float3 normal : TEXCOORD1; + + #if defined(BINORMAL_PER_FRAGMENT) + float4 tangent : TEXCOORD2; + #else + float3 tangent : TEXCOORD2; + float3 binormal : TEXCOORD3; + #endif + + #if FOG_DEPTH + float4 worldPos : TEXCOORD4; + #else + float3 worldPos : TEXCOORD4; + #endif + + UNITY_SHADOW_COORDS(5) + + #if defined(VERTEXLIGHT_ON) + float3 vertexLightColor : TEXCOORD6; + #endif + + #if defined(LIGHTMAP_ON) || ADDITIONAL_MASKED_DIRECTIONAL_SHADOWS + float2 lightmapUV : TEXCOORD6; + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float2 dynamicLightmapUV : TEXCOORD7; + #endif + + #if defined(_PARALLAX_MAP) + float3 tangentViewDir : TEXCOORD8; + #endif + + #if defined (CUSTOM_GEOMETRY_INTERPOLATORS) + CUSTOM_GEOMETRY_INTERPOLATORS + #endif +}; + +float GetDetailMask (Interpolators i) { + #if defined (_DETAIL_MASK) + return tex2D(_DetailMask, i.uv.xy).a; + #else + return 1; + #endif +} + +float3 GetAlbedo (Interpolators i) { + float3 albedo = + tex2D(_MainTex, i.uv.xy).rgb * UNITY_ACCESS_INSTANCED_PROP(_Color_arr, _Color).rgb; + #if defined (_DETAIL_ALBEDO_MAP) + float3 details = tex2D(_DetailTex, i.uv.zw) * unity_ColorSpaceDouble; + albedo = lerp(albedo, albedo * details, GetDetailMask(i)); + #endif + return albedo; +} + +float GetAlpha (Interpolators i) { + float alpha = UNITY_ACCESS_INSTANCED_PROP(_Color_arr, _Color).a; + #if !defined(_SMOOTHNESS_ALBEDO) + alpha *= tex2D(_MainTex, i.uv.xy).a; + #endif + return alpha; +} + +float3 GetTangentSpaceNormal (Interpolators i) { + float3 normal = float3(0, 0, 1); + #if defined(_NORMAL_MAP) + normal = UnpackScaleNormal(tex2D(_NormalMap, i.uv.xy), _BumpScale); + #endif + #if defined(_DETAIL_NORMAL_MAP) + float3 detailNormal = + UnpackScaleNormal( + tex2D(_DetailNormalMap, i.uv.zw), _DetailBumpScale + ); + detailNormal = lerp(float3(0, 0, 1), detailNormal, GetDetailMask(i)); + normal = BlendNormals(normal, detailNormal); + #endif + return normal; +} + +float GetMetallic (Interpolators i) { + #if defined(_METALLIC_MAP) + return tex2D(_MetallicMap, i.uv.xy).r; + #else + return _Metallic; + #endif +} + +float GetSmoothness (Interpolators i) { + float smoothness = 1; + #if defined(_SMOOTHNESS_ALBEDO) + smoothness = tex2D(_MainTex, i.uv.xy).a; + #elif defined(_SMOOTHNESS_METALLIC) && defined(_METALLIC_MAP) + smoothness = tex2D(_MetallicMap, i.uv.xy).a; + #endif + return smoothness * _Smoothness; +} + +float GetOcclusion (Interpolators i) { + #if defined(_OCCLUSION_MAP) + return lerp(1, tex2D(_OcclusionMap, i.uv.xy).g, _OcclusionStrength); + #else + return 1; + #endif +} + +float3 GetEmission (Interpolators i) { + #if defined(FORWARD_BASE_PASS) || defined(DEFERRED_PASS) + #if defined(_EMISSION_MAP) + return tex2D(_EmissionMap, i.uv.xy) * _Emission; + #else + return _Emission; + #endif + #else + return 0; + #endif +} + +#endif \ No newline at end of file diff --git a/Assets/Shaders/Terrain/My Lighting Input.cginc.meta b/Assets/Shaders/Terrain/My Lighting Input.cginc.meta new file mode 100644 index 000000000..a0093976e --- /dev/null +++ b/Assets/Shaders/Terrain/My Lighting Input.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7c6ade21406f37245952141a96131ba8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Terrain/My Lighting.cginc b/Assets/Shaders/Terrain/My Lighting.cginc new file mode 100644 index 000000000..b68c6eb9e --- /dev/null +++ b/Assets/Shaders/Terrain/My Lighting.cginc @@ -0,0 +1,516 @@ +#if !defined(MY_LIGHTING_INCLUDED) +#define MY_LIGHTING_INCLUDED + +#include "My Lighting Input.cginc" + +#if !defined(ALBEDO_FUNCTION) + #define ALBEDO_FUNCTION GetAlbedo +#endif + +void ComputeVertexLightColor (inout InterpolatorsVertex i) { + #if defined(VERTEXLIGHT_ON) + i.vertexLightColor = Shade4PointLights( + unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, + unity_LightColor[0].rgb, unity_LightColor[1].rgb, + unity_LightColor[2].rgb, unity_LightColor[3].rgb, + unity_4LightAtten0, i.worldPos.xyz, i.normal + ); + #endif +} + +float3 CreateBinormal (float3 normal, float3 tangent, float binormalSign) { + return cross(normal, tangent.xyz) * + (binormalSign * unity_WorldTransformParams.w); +} + +InterpolatorsVertex MyVertexProgram (VertexData v) { + InterpolatorsVertex i; + UNITY_INITIALIZE_OUTPUT(InterpolatorsVertex, i); + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, i); + + i.uv.xy = TRANSFORM_TEX(v.uv, _MainTex); + i.uv.zw = TRANSFORM_TEX(v.uv, _DetailTex); + + float displacement = tex2Dlod(_DisplacementMap, float4(i.uv.xy, 0, 0)).r * _DisplacementStrength; + //v.normal = normalize(v.normal); + //v.vertex.xyz += v.normal * displacement; + v.vertex.y += displacement; + + i.pos = UnityObjectToClipPos(v.vertex); + i.worldPos.xyz = mul(unity_ObjectToWorld, v.vertex); + #if FOG_DEPTH + i.worldPos.w = i.pos.z; + #endif + i.normal = UnityObjectToWorldNormal(v.normal); + + #if defined(BINORMAL_PER_FRAGMENT) + i.tangent = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + #else + i.tangent = UnityObjectToWorldDir(v.tangent.xyz); + i.binormal = CreateBinormal(i.normal, i.tangent, v.tangent.w); + #endif + + #if defined(LIGHTMAP_ON) || ADDITIONAL_MASKED_DIRECTIONAL_SHADOWS + i.lightmapUV = v.uv1 * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + i.dynamicLightmapUV = + v.uv2 * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + UNITY_TRANSFER_SHADOW(i, v.uv1); + + ComputeVertexLightColor(i); + + + return i; +} + +float FadeShadows (Interpolators i, float attenuation) { + #if HANDLE_SHADOWS_BLENDING_IN_GI || ADDITIONAL_MASKED_DIRECTIONAL_SHADOWS + // UNITY_LIGHT_ATTENUATION doesn't fade shadows for us. + #if ADDITIONAL_MASKED_DIRECTIONAL_SHADOWS + attenuation = SHADOW_ATTENUATION(i); + #endif + float viewZ = + dot(_WorldSpaceCameraPos - i.worldPos, UNITY_MATRIX_V[2].xyz); + float shadowFadeDistance = + UnityComputeShadowFadeDistance(i.worldPos, viewZ); + float shadowFade = UnityComputeShadowFade(shadowFadeDistance); + float bakedAttenuation = + UnitySampleBakedOcclusion(i.lightmapUV, i.worldPos); + attenuation = UnityMixRealtimeAndBakedShadows( + attenuation, bakedAttenuation, shadowFade + ); + #endif + + return attenuation; +} + +UnityLight CreateLight (Interpolators i) { + UnityLight light; + + #if defined(DEFERRED_PASS) || SUBTRACTIVE_LIGHTING + light.dir = float3(0, 1, 0); + light.color = 0; + #else + #if defined(POINT) || defined(POINT_COOKIE) || defined(SPOT) + light.dir = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + #else + light.dir = _WorldSpaceLightPos0.xyz; + #endif + + UNITY_LIGHT_ATTENUATION(attenuation, i, i.worldPos.xyz); + attenuation = FadeShadows(i, attenuation); + + light.color = _LightColor0.rgb * attenuation; + #endif + + return light; +} + +float3 BoxProjection ( + float3 direction, float3 position, + float4 cubemapPosition, float3 boxMin, float3 boxMax +) { + #if UNITY_SPECCUBE_BOX_PROJECTION + UNITY_BRANCH + if (cubemapPosition.w > 0) { + float3 factors = + ((direction > 0 ? boxMax : boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition); + } + #endif + return direction; +} + +void ApplySubtractiveLighting ( + Interpolators i, inout UnityIndirect indirectLight +) { + #if SUBTRACTIVE_LIGHTING + UNITY_LIGHT_ATTENUATION(attenuation, i, i.worldPos.xyz); + attenuation = FadeShadows(i, attenuation); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = + ndotl * (1 - attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = + lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif +} + +UnityIndirect CreateIndirectLight (Interpolators i, float3 viewDir) { + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(VERTEXLIGHT_ON) + indirectLight.diffuse = i.vertexLightColor; + #endif + + #if defined(FORWARD_BASE_PASS) || defined(DEFERRED_PASS) + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = + DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, i.lightmapUV)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, i.lightmapUV + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, i.normal + ); + #endif + + ApplySubtractiveLighting(i, indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, i.dynamicLightmapUV) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + i.dynamicLightmapUV + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, i.normal + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(i.normal, 1), i.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = + LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else { + indirectLight.diffuse += + max(0, ShadeSH9(float4(i.normal, 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(i.normal, 1))); + #endif + #endif + + float3 reflectionDir = reflect(-viewDir, i.normal); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - GetSmoothness(i); + envData.reflUVW = BoxProjection( + reflectionDir, i.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, i.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + UNITY_BRANCH + if (interpolator < 0.99999) { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + + float occlusion = GetOcclusion(i); + indirectLight.diffuse *= occlusion; + indirectLight.specular *= occlusion; + + #if defined(DEFERRED_PASS) && UNITY_ENABLE_REFLECTION_BUFFERS + indirectLight.specular = 0; + #endif + #endif + + return indirectLight; +} + +float3 calcNormal (float3 pos, float2 uv) +{ + /*float3 n = float3(pos.x, + tex2D(_DisplacementMap, float2(uv.x, uv.y + _DisplacementMap_TexelSize.y * _DisplacementStep)).x * -_DisplacementStrength, + pos.z + _DisplacementMap_TexelSize.y * unity_ObjectToWorld._m00 * _DisplacementStep); + float3 s = float3(pos.x, + tex2D(_DisplacementMap, float2(uv.x, uv.y - _DisplacementMap_TexelSize.y * _DisplacementStep)).x * -_DisplacementStrength, + pos.z - _DisplacementMap_TexelSize.y * unity_ObjectToWorld._m00 * _DisplacementStep); + float3 e = float3(pos.x + _DisplacementMap_TexelSize.x * unity_ObjectToWorld._m00 * _DisplacementStep, + tex2D(_DisplacementMap, float2(uv.x + _DisplacementMap_TexelSize.x * _DisplacementStep, uv.y)).x * -_DisplacementStrength, + pos.z); + float3 w = float3(pos.x - _DisplacementMap_TexelSize.x * unity_ObjectToWorld._m00 * _DisplacementStep, + tex2D(_DisplacementMap, float2(uv.x - _DisplacementMap_TexelSize.x * _DisplacementStep, uv.y)).x * -_DisplacementStrength, + pos.z); + float3 norm = cross(normalize(n-s),normalize(e-w));*/ + float3 n = float3(pos.x, + tex2D(_DisplacementMap, float2(uv.x, uv.y + _DisplacementMap_TexelSize.y * _DisplacementStep)).x * -_DisplacementStrength, + pos.z + _DisplacementMap_TexelSize.y * unity_ObjectToWorld._m00 * _DisplacementStep); + float3 me = float3(pos.x, + tex2D(_DisplacementMap, float2(uv.x, uv.y)).x * -_DisplacementStrength, + pos.z); + float3 e = float3(pos.x + _DisplacementMap_TexelSize.x * unity_ObjectToWorld._m00 * _DisplacementStep, + tex2D(_DisplacementMap, float2(uv.x + _DisplacementMap_TexelSize.x * _DisplacementStep, uv.y)).x * -_DisplacementStrength, + pos.z); + //float3 norm = cross(normalize(n-s),normalize(e-w)); + float3 norm = cross(normalize(n-me),normalize(e-me)); + return norm; +} + +void InitializeFragmentNormal(inout Interpolators i) { +/* float3 tangentSpaceNormal = GetTangentSpaceNormal(i); + #if defined(BINORMAL_PER_FRAGMENT) + float3 binormal = + CreateBinormal(i.normal, i.tangent.xyz, i.tangent.w); + #else + float3 binormal = i.binormal; + #endif + + i.normal = normalize( + tangentSpaceNormal.x * i.tangent + + tangentSpaceNormal.y * binormal + + tangentSpaceNormal.z * i.normal + );*/ + i.normal = calcNormal(i.worldPos.xyz,i.uv.xy); +} + +float4 ApplyFog (float4 color, Interpolators i) { + #if FOG_ON + float viewDistance = length(_WorldSpaceCameraPos - i.worldPos.xyz); + #if FOG_DEPTH + viewDistance = UNITY_Z_0_FAR_FROM_CLIPSPACE(i.worldPos.w); + #endif + UNITY_CALC_FOG_FACTOR_RAW(viewDistance); + float3 fogColor = 0; + #if defined(FORWARD_BASE_PASS) + fogColor = unity_FogColor.rgb; + #endif + color.rgb = lerp(fogColor, color.rgb, saturate(unityFogFactor)); + #endif + return color; +} +/* +float GetParallaxHeight (float2 uv) { + return tex2D(_ParallaxMap, uv).g; +} + +float2 ParallaxOffset (float2 uv, float2 viewDir) { + float height = GetParallaxHeight(uv); + height -= 0.5; + height *= _ParallaxStrength; + return viewDir * height; +} + +float2 ParallaxRaymarching (float2 uv, float2 viewDir) { + #if !defined(PARALLAX_RAYMARCHING_STEPS) + #define PARALLAX_RAYMARCHING_STEPS 10 + #endif + float2 uvOffset = 0; + float stepSize = 1.0 / PARALLAX_RAYMARCHING_STEPS; + float2 uvDelta = viewDir * (stepSize * _ParallaxStrength); + + float stepHeight = 1; + float surfaceHeight = GetParallaxHeight(uv); + + float2 prevUVOffset = uvOffset; + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + for ( + int i = 1; + i < PARALLAX_RAYMARCHING_STEPS && stepHeight > surfaceHeight; + i++ + ) { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = GetParallaxHeight(uv + uvOffset); + } + + #if !defined(PARALLAX_RAYMARCHING_SEARCH_STEPS) + #define PARALLAX_RAYMARCHING_SEARCH_STEPS 0 + #endif + #if PARALLAX_RAYMARCHING_SEARCH_STEPS > 0 + for (int i = 0; i < PARALLAX_RAYMARCHING_SEARCH_STEPS; i++) { + uvDelta *= 0.5; + stepSize *= 0.5; + + if (stepHeight < surfaceHeight) { + uvOffset += uvDelta; + stepHeight += stepSize; + } + else { + uvOffset -= uvDelta; + stepHeight -= stepSize; + } + surfaceHeight = GetParallaxHeight(uv + uvOffset); + } + #elif defined(PARALLAX_RAYMARCHING_INTERPOLATE) + float prevDifference = prevStepHeight - prevSurfaceHeight; + float difference = surfaceHeight - stepHeight; + float t = prevDifference / (prevDifference + difference); + uvOffset = prevUVOffset - uvDelta * t; + #endif + + return uvOffset; +} + +void ApplyParallax (inout Interpolators i) { + #if defined(_PARALLAX_MAP) + i.tangentViewDir = normalize(i.tangentViewDir); + #if !defined(PARALLAX_OFFSET_LIMITING) + #if !defined(PARALLAX_BIAS) + #define PARALLAX_BIAS 0.42 + #endif + i.tangentViewDir.xy /= (i.tangentViewDir.z + PARALLAX_BIAS); + #endif + + #if !defined(PARALLAX_FUNCTION) + #define PARALLAX_FUNCTION ParallaxOffset + #endif + float2 uvOffset = PARALLAX_FUNCTION(i.uv.xy, i.tangentViewDir.xy); + i.uv.xy += uvOffset; + i.uv.zw += uvOffset * (_DetailTex_ST.xy / _MainTex_ST.xy); + #endif +}*/ + +struct FragmentOutput { + #if defined(DEFERRED_PASS) + float4 gBuffer0 : SV_Target0; + float4 gBuffer1 : SV_Target1; + float4 gBuffer2 : SV_Target2; + float4 gBuffer3 : SV_Target3; + + #if defined(SHADOWS_SHADOWMASK) && (UNITY_ALLOWED_MRT_COUNT > 4) + float4 gBuffer4 : SV_Target4; + #endif + #else + float4 color : SV_Target; + #endif +}; + +float cells( float3 p ) +{ + + // find distance to closest "white checker" in checkerboard pattern + p = frac(p/2.0)*2.0; + + p = min( p, 2.0-p ); + + //return -abs(1-(p.x+p.y+p.z)); + + return min((p.x+p.y+p.z),length((p.x+p.y+p.z)-3.0)); + return min(length(p),length(p-1.0)); +} + +FragmentOutput MyFragmentProgram (Interpolators i) { + UNITY_SETUP_INSTANCE_ID(i); + #if defined(LOD_FADE_CROSSFADE) + UnityApplyDitherCrossFade(i.vpos); + #endif + + //ApplyParallax(i); + + InitializeFragmentNormal(i); + + float3 viewDir = normalize(_WorldSpaceCameraPos - i.worldPos.xyz); + + half inclination = 1 - saturate(dot (float3(0,1,0), i.normal)); + + i.normal = dot(viewDir, i.normal) > 0 ? i.normal : -i.normal; + + half rim = saturate(dot (normalize(viewDir), i.normal)); + + float alpha = tex2D (_AlphaMask, i.uv).r * + (1 - saturate(max(0, abs(i.worldPos.y - _AlphaRangeCenter) - _AlphaRange) / _AlphaRangeFeather)) * + (cells(i.worldPos * _AlphaTiling) + + (pow((rim), _FresnelClipPower) + _FresnelClipOffset) * _FresnelClip);// * inclination + + #if defined(_RENDERING_CUTOUT) + clip(alpha - _AlphaClip); + #endif + + + float3 specularTint; + float oneMinusReflectivity; + float3 albedo = DiffuseAndSpecularFromMetallic( + ALBEDO_FUNCTION(i), GetMetallic(i), specularTint, oneMinusReflectivity + ); + + + #if defined(_RENDERING_TRANSPARENT) + albedo *= alpha; + alpha = 1 - oneMinusReflectivity + alpha * oneMinusReflectivity; + #endif + + float4 color = UNITY_BRDF_PBS( + albedo, specularTint, + oneMinusReflectivity, GetSmoothness(i), + i.normal, viewDir, + CreateLight(i), CreateIndirectLight(i, viewDir) + ); + + float3 dir = refract(viewDir,i.normal,_BackgroundFresnel); + color.rgb += texCUBElod(_Background, float4(dir, _BackgroundBlur)).rgb * _Emission * pow(rim,_EmissionFresnel) * _EmissionColor;// * (max(sign(alpha - _AlphaClip),0)/2+.5); + + #if defined(_RENDERING_FADE) || defined(_RENDERING_TRANSPARENT) + color.a = alpha; + #endif + + FragmentOutput output; + #if defined(DEFERRED_PASS) + #if !defined(UNITY_HDR_ON) + color.rgb = exp2(-color.rgb); + #endif + output.gBuffer0.rgb = albedo; + output.gBuffer0.a = GetOcclusion(i); + output.gBuffer1.rgb = specularTint; + output.gBuffer1.a = GetSmoothness(i); + output.gBuffer2 = float4(i.normal * 0.5 + 0.5, 1); + output.gBuffer3 = color; + + #if defined(SHADOWS_SHADOWMASK) && (UNITY_ALLOWED_MRT_COUNT > 4) + float2 shadowUV = 0; + #if defined(LIGHTMAP_ON) + shadowUV = i.lightmapUV; + #endif + output.gBuffer4 = + UnityGetRawBakedOcclusions(shadowUV, i.worldPos.xyz); + #endif + #else + output.color = ApplyFog(color, i); + #endif + return output; +} + +#endif \ No newline at end of file diff --git a/Assets/Shaders/Terrain/My Lighting.cginc.meta b/Assets/Shaders/Terrain/My Lighting.cginc.meta new file mode 100644 index 000000000..321f5cc3a --- /dev/null +++ b/Assets/Shaders/Terrain/My Lighting.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7a83902aa5fd68b44b04184a07f63be2 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Terrain/My Shadows.cginc b/Assets/Shaders/Terrain/My Shadows.cginc new file mode 100644 index 000000000..fdc5e6f29 --- /dev/null +++ b/Assets/Shaders/Terrain/My Shadows.cginc @@ -0,0 +1,146 @@ +// Upgrade NOTE: upgraded instancing buffer 'InstanceProperties' to new syntax. + +#if !defined(MY_SHADOWS_INCLUDED) +#define MY_SHADOWS_INCLUDED + +#include "UnityCG.cginc" + +#if defined(_RENDERING_FADE) || defined(_RENDERING_TRANSPARENT) + #if defined(_SEMITRANSPARENT_SHADOWS) + #define SHADOWS_SEMITRANSPARENT 1 + #else + #define _RENDERING_CUTOUT + #endif +#endif + +#if SHADOWS_SEMITRANSPARENT || defined(_RENDERING_CUTOUT) + #if !defined(_SMOOTHNESS_ALBEDO) + #define SHADOWS_NEED_UV 1 + #endif +#endif + +#if defined(_PARALLAX_MAP) && defined(VERTEX_DISPLACEMENT_INSTEAD_OF_PARALLAX) + #undef _PARALLAX_MAP + #define VERTEX_DISPLACEMENT 1 + #if !defined(SHADOWS_NEED_UV) + #define SHADOWS_NEED_UV 1 + #endif +#endif + +UNITY_INSTANCING_BUFFER_START(InstanceProperties) + UNITY_DEFINE_INSTANCED_PROP(float4, _Color) +#define _Color_arr InstanceProperties +UNITY_INSTANCING_BUFFER_END(InstanceProperties) + +sampler2D _MainTex; +float4 _MainTex_ST; +float _Cutoff; + +sampler2D _DisplacementMap; +float _DisplacementStrength; + +float _FresnelClip; +float _FresnelClipPower; +float _FresnelClipOffset; +float _AlphaClip; +float _AlphaRange; +float _AlphaRangeFeather; +float _AlphaRangeCenter; + +sampler3D _DitherMaskLOD; + +struct VertexData { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 vertex : POSITION; + float3 normal : NORMAL; + float2 uv : TEXCOORD0; +}; + +struct InterpolatorsVertex { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 position : SV_POSITION; + #if SHADOWS_NEED_UV + float2 uv : TEXCOORD0; + #endif + #if defined(SHADOWS_CUBE) + float3 lightVec : TEXCOORD1; + #endif +}; + +struct Interpolators { + UNITY_VERTEX_INPUT_INSTANCE_ID + #if SHADOWS_SEMITRANSPARENT || defined(LOD_FADE_CROSSFADE) + UNITY_VPOS_TYPE vpos : VPOS; + #else + float4 position : SV_POSITION; + #endif + + #if SHADOWS_NEED_UV + float2 uv : TEXCOORD0; + #endif + #if defined(SHADOWS_CUBE) + float3 lightVec : TEXCOORD1; + #endif +}; + +float GetAlpha (Interpolators i) { + float alpha = UNITY_ACCESS_INSTANCED_PROP(_Color_arr, _Color).a; + #if SHADOWS_NEED_UV + alpha *= tex2D(_MainTex, i.uv.xy).a; + #endif + return alpha; +} + +#define MyVertexProgram MyShadowVertexProgram + +InterpolatorsVertex MyShadowVertexProgram (VertexData v) { + InterpolatorsVertex i; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_TRANSFER_INSTANCE_ID(v, i); + + #if SHADOWS_NEED_UV + i.uv = TRANSFORM_TEX(v.uv, _MainTex); + #endif + + float displacement = tex2Dlod(_DisplacementMap, float4(v.uv.xy, 0, 0)).r * _DisplacementStrength; + v.normal = normalize(v.normal); + v.vertex.xyz += v.normal * displacement; + + #if defined(SHADOWS_CUBE) + i.position = UnityObjectToClipPos(v.vertex); + i.lightVec = + mul(unity_ObjectToWorld, v.vertex).xyz - _LightPositionRange.xyz; + #else + i.position = UnityClipSpaceShadowCasterPos(v.vertex.xyz, v.normal); + i.position = UnityApplyLinearShadowBias(i.position); + #endif + return i; +} + +float4 MyShadowFragmentProgram (Interpolators i) : SV_TARGET { + UNITY_SETUP_INSTANCE_ID(i); + #if defined(LOD_FADE_CROSSFADE) + UnityApplyDitherCrossFade(i.vpos); + #endif + + float alpha = GetAlpha(i); + #if defined(_RENDERING_CUTOUT) + clip(alpha - _Cutoff); + #endif + + #if SHADOWS_SEMITRANSPARENT + float dither = + tex3D(_DitherMaskLOD, float3(i.vpos.xy * 0.25, alpha * 0.9375)).a; + clip(dither - 0.01); + #endif + + #if defined(SHADOWS_CUBE) + float depth = length(i.lightVec) + unity_LightShadowBias.x; + depth *= _LightPositionRange.w; + return UnityEncodeCubeShadowDepth(depth); + #else + return 0; + #endif +} + +#endif \ No newline at end of file diff --git a/Assets/Shaders/Terrain/My Shadows.cginc.meta b/Assets/Shaders/Terrain/My Shadows.cginc.meta new file mode 100644 index 000000000..a3a9aeefe --- /dev/null +++ b/Assets/Shaders/Terrain/My Shadows.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6ace5cd9cb5fe13488661c8c52e98356 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Terrain/MyTessellation.cginc b/Assets/Shaders/Terrain/MyTessellation.cginc new file mode 100644 index 000000000..f11d9466a --- /dev/null +++ b/Assets/Shaders/Terrain/MyTessellation.cginc @@ -0,0 +1,142 @@ +#if !defined(TESSELLATION_INCLUDED) +#define TESSELLATION_INCLUDED + +float _TessellationUniform; +float _TessellationEdgeLength; + +struct TessellationControlPoint { + float4 vertex : INTERNALTESSPOS; + float3 normal : NORMAL; + #if TESSELLATION_TANGENT + float4 tangent : TANGENT; + #endif + float2 uv : TEXCOORD0; + #if TESSELLATION_UV1 + float2 uv1 : TEXCOORD1; + #endif + #if TESSELLATION_UV2 + float2 uv2 : TEXCOORD2; + #endif +}; + +struct TessellationFactors { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; +}; + +TessellationControlPoint MyTessellationVertexProgram (VertexData v) { + TessellationControlPoint p; + p.vertex = v.vertex; + p.normal = v.normal; + #if TESSELLATION_TANGENT + p.tangent = v.tangent; + #endif + p.uv = v.uv; + #if TESSELLATION_UV1 + p.uv1 = v.uv1; + #endif + #if TESSELLATION_UV2 + p.uv2 = v.uv2; + #endif + return p; +} + +bool TriangleIsBelowClipPlane ( + float3 p0, float3 p1, float3 p2, int planeIndex, float bias +) { + float4 plane = unity_CameraWorldClipPlanes[planeIndex]; + return + dot(float4(p0, 1), plane) < bias && + dot(float4(p1, 1), plane) < bias && + dot(float4(p2, 1), plane) < bias; +} + +bool TriangleIsCulled (float3 p0, float3 p1, float3 p2, float bias) { + return + TriangleIsBelowClipPlane(p0, p1, p2, 0, bias) || + TriangleIsBelowClipPlane(p0, p1, p2, 1, bias) || + TriangleIsBelowClipPlane(p0, p1, p2, 2, bias) || + TriangleIsBelowClipPlane(p0, p1, p2, 3, bias); +} + +float TessellationEdgeFactor (float3 p0, float3 p1) { + #if defined(_TESSELLATION_EDGE) + float edgeLength = distance(p0, p1); + + float3 edgeCenter = (p0 + p1) * 0.5; + float viewDistance = distance(edgeCenter, _WorldSpaceCameraPos); + + return edgeLength * _ScreenParams.y / + (_TessellationEdgeLength * viewDistance); + #else + return _TessellationUniform; + #endif +} + +TessellationFactors MyPatchConstantFunction ( + InputPatch patch +) { + float3 p0 = mul(unity_ObjectToWorld, patch[0].vertex).xyz; + float3 p1 = mul(unity_ObjectToWorld, patch[1].vertex).xyz; + float3 p2 = mul(unity_ObjectToWorld, patch[2].vertex).xyz; + TessellationFactors f; + + float bias = 500 * _DisplacementStrength; + + if (TriangleIsCulled(p0, p1, p2, bias)) { + f.edge[0] = f.edge[1] = f.edge[2] = f.inside = 0; + } + else { + f.edge[0] = TessellationEdgeFactor(p1, p2); + f.edge[1] = TessellationEdgeFactor(p2, p0); + f.edge[2] = TessellationEdgeFactor(p0, p1); + f.inside = + (TessellationEdgeFactor(p1, p2) + + TessellationEdgeFactor(p2, p0) + + TessellationEdgeFactor(p0, p1)) * (1 / 3.0); + } + return f; +} + +[UNITY_domain("tri")] +[UNITY_outputcontrolpoints(3)] +[UNITY_outputtopology("triangle_cw")] +[UNITY_partitioning("fractional_even")] +[UNITY_patchconstantfunc("MyPatchConstantFunction")] +TessellationControlPoint MyHullProgram ( + InputPatch patch, + uint id : SV_OutputControlPointID +) { + return patch[id]; +} + +[UNITY_domain("tri")] +InterpolatorsVertex MyDomainProgram ( + TessellationFactors factors, + OutputPatch patch, + float3 barycentricCoordinates : SV_DomainLocation +) { + VertexData data; + + #define MY_DOMAIN_PROGRAM_INTERPOLATE(fieldName) data.fieldName = \ + patch[0].fieldName * barycentricCoordinates.x + \ + patch[1].fieldName * barycentricCoordinates.y + \ + patch[2].fieldName * barycentricCoordinates.z; + + MY_DOMAIN_PROGRAM_INTERPOLATE(vertex) + MY_DOMAIN_PROGRAM_INTERPOLATE(normal) + #if TESSELLATION_TANGENT + MY_DOMAIN_PROGRAM_INTERPOLATE(tangent) + #endif + MY_DOMAIN_PROGRAM_INTERPOLATE(uv) + #if TESSELLATION_UV1 + MY_DOMAIN_PROGRAM_INTERPOLATE(uv1) + #endif + #if TESSELLATION_UV2 + MY_DOMAIN_PROGRAM_INTERPOLATE(uv2) + #endif + + return MyVertexProgram(data); +} + +#endif \ No newline at end of file diff --git a/Assets/Shaders/Terrain/MyTessellation.cginc.meta b/Assets/Shaders/Terrain/MyTessellation.cginc.meta new file mode 100644 index 000000000..282e5c818 --- /dev/null +++ b/Assets/Shaders/Terrain/MyTessellation.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: deddf69d351b0144992ae478199ad126 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Terrain/Tessellation Shader.shader b/Assets/Shaders/Terrain/Tessellation Shader.shader new file mode 100644 index 000000000..55159d761 --- /dev/null +++ b/Assets/Shaders/Terrain/Tessellation Shader.shader @@ -0,0 +1,207 @@ +Shader "Aetheria/Grid" { + + Properties { + _Color ("Tint", Color) = (1, 1, 1, 1) + _MainTex ("Albedo", 2D) = "white" {} + + [Gamma] _Metallic ("Metallic", Range(0, 1)) = 0 + _Smoothness ("Smoothness", Range(0, 1)) = 0.1 + + _TessellationUniform ("Tessellation Uniform", Range(1, 64)) = 1 + _TessellationEdgeLength ("Tessellation Edge Length", Range(5, 100)) = 50 + + [NoScaleOffset] _DisplacementMap ("Displacement Texture (R)", 2D) = "gray" {} + _DisplacementStrength ("Displacement", Float) = 1.0 + _DisplacementStep ("Displacement Step", Float) = 1.0 + + _EmissionColor ("Emission Color", Color) = (1,1,1,1) + _Emission ("Emission Strength", Float) = 0 + _EmissionFresnel ("Emission Fresnel", Float) = 1.0 + + _FresnelClip("Fresnel Clip", Float) = 0.5 + _FresnelClipOffset("Fresnel Clip Offset", Float) = 0.5 + _FresnelClipPower("Fresnel Clip Power", Float) = 2 + + _AlphaMask ("Alpha Mask (R)", 2D) = "white" {} + _AlphaClip("Clip Alpha", Float) = 0.5 + _AlphaTiling("Alpha Texture Tiling", Float) = 5 + _AlphaRange("Alpha Range (World Y)", Float) = 50 + _AlphaRangeFeather("Alpha Range Feather", Float) = 10 + _AlphaRangeCenter("Alpha Range Center", Float) = -60 + + _Background ("Background", CUBE) = "" {} + _BackgroundFresnel ("Background Fresnel", Float) = 1.0 + _BackgroundBlur ("Background Blur", Float) = 2 + + [HideInInspector] _SrcBlend ("_SrcBlend", Float) = 1 + [HideInInspector] _DstBlend ("_DstBlend", Float) = 0 + [HideInInspector] _ZWrite ("_ZWrite", Float) = 1 + } + + CGINCLUDE + + #define BINORMAL_PER_FRAGMENT + #define FOG_DISTANCE + + #define VERTEX_DISPLACEMENT_INSTEAD_OF_PARALLAX + + ENDCG + + SubShader { + + Pass { + Tags { + "LightMode" = "ForwardBase" + } + Blend [_SrcBlend] [_DstBlend] + ZWrite [_ZWrite] + Cull Off + + CGPROGRAM + + #pragma target 4.6 + + #pragma shader_feature _ _RENDERING_CUTOUT _RENDERING_FADE _RENDERING_TRANSPARENT + #pragma shader_feature _METALLIC_MAP + #pragma shader_feature _ _SMOOTHNESS_ALBEDO _SMOOTHNESS_METALLIC + #pragma shader_feature _NORMAL_MAP + #pragma shader_feature _PARALLAX_MAP + #pragma shader_feature _OCCLUSION_MAP + #pragma shader_feature _EMISSION_MAP + #pragma shader_feature _DETAIL_MASK + #pragma shader_feature _DETAIL_ALBEDO_MAP + #pragma shader_feature _DETAIL_NORMAL_MAP + #pragma shader_feature _TESSELLATION_EDGE + + #pragma multi_compile _ LOD_FADE_CROSSFADE + + #pragma multi_compile_fwdbase + #pragma multi_compile_fog + + #pragma vertex MyTessellationVertexProgram + #pragma fragment MyFragmentProgram + #pragma hull MyHullProgram + #pragma domain MyDomainProgram + + #define FORWARD_BASE_PASS + + #include "My Lighting.cginc" + #include "MyTessellation.cginc" + + ENDCG + } + + Pass { + Tags { + "LightMode" = "ForwardAdd" + } + + Blend [_SrcBlend] One + ZWrite Off + Cull Off + + CGPROGRAM + + #pragma target 4.6 + + #pragma shader_feature _ _RENDERING_CUTOUT _RENDERING_FADE _RENDERING_TRANSPARENT + #pragma shader_feature _METALLIC_MAP + #pragma shader_feature _ _SMOOTHNESS_ALBEDO _SMOOTHNESS_METALLIC + #pragma shader_feature _NORMAL_MAP + #pragma shader_feature _PARALLAX_MAP + #pragma shader_feature _DETAIL_MASK + #pragma shader_feature _DETAIL_ALBEDO_MAP + #pragma shader_feature _DETAIL_NORMAL_MAP + #pragma shader_feature _TESSELLATION_EDGE + + #pragma multi_compile _ LOD_FADE_CROSSFADE + + #pragma multi_compile_fwdadd_fullshadows + #pragma multi_compile_fog + + #pragma vertex MyTessellationVertexProgram + #pragma fragment MyFragmentProgram + #pragma hull MyHullProgram + #pragma domain MyDomainProgram + + #include "My Lighting.cginc" + #include "MyTessellation.cginc" + + ENDCG + } + + Pass { + Tags { + "LightMode" = "Deferred" + } + Cull Off + + CGPROGRAM + + #pragma target 4.6 + #pragma exclude_renderers nomrt + + #pragma shader_feature _ _RENDERING_CUTOUT + //#pragma shader_feature _RENDERING_TRANSPARENT + #pragma shader_feature _METALLIC_MAP + #pragma shader_feature _ _SMOOTHNESS_ALBEDO _SMOOTHNESS_METALLIC + #pragma shader_feature _NORMAL_MAP + #pragma shader_feature _PARALLAX_MAP + #pragma shader_feature _OCCLUSION_MAP + #pragma shader_feature _EMISSION_MAP + #pragma shader_feature _DETAIL_MASK + #pragma shader_feature _DETAIL_ALBEDO_MAP + #pragma shader_feature _DETAIL_NORMAL_MAP + #pragma shader_feature _TESSELLATION_EDGE + + #pragma multi_compile _ LOD_FADE_CROSSFADE + + #pragma multi_compile_prepassfinal + + #pragma vertex MyTessellationVertexProgram + #pragma fragment MyFragmentProgram + #pragma hull MyHullProgram + #pragma domain MyDomainProgram + + #define DEFERRED_PASS + + #include "My Lighting.cginc" + #include "MyTessellation.cginc" + + ENDCG + } + + Pass { + Tags { + "LightMode" = "ShadowCaster" + } + Cull Off + + CGPROGRAM + + #pragma target 4.6 + + #pragma shader_feature _ _RENDERING_CUTOUT _RENDERING_FADE _RENDERING_TRANSPARENT + #pragma shader_feature _SEMITRANSPARENT_SHADOWS + #pragma shader_feature _SMOOTHNESS_ALBEDO + #pragma shader_feature _PARALLAX_MAP + #pragma shader_feature _TESSELLATION_EDGE + + #pragma multi_compile _ LOD_FADE_CROSSFADE + + #pragma multi_compile_shadowcaster + + #pragma vertex MyTessellationVertexProgram + #pragma fragment MyShadowFragmentProgram + #pragma hull MyHullProgram + #pragma domain MyDomainProgram + + #include "My Shadows.cginc" + #include "MyTessellation.cginc" + + ENDCG + } + } + + CustomEditor "MyLightingShaderGUI" +} \ No newline at end of file diff --git a/Assets/Shaders/Terrain/Tessellation Shader.shader.meta b/Assets/Shaders/Terrain/Tessellation Shader.shader.meta new file mode 100644 index 000000000..5b8640634 --- /dev/null +++ b/Assets/Shaders/Terrain/Tessellation Shader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 715b1ce444e57364a9458657be896071 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/DisplacementFlat.tga b/Assets/Textures/DisplacementFlat.tga new file mode 100644 index 000000000..fc3739e99 --- /dev/null +++ b/Assets/Textures/DisplacementFlat.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:554821e976f8a647e8ed03e70165578b854496082df7aa0e4b4d1dda2651c773 +size 1048594 diff --git a/Assets/Textures/DisplacementFlat.tga.meta b/Assets/Textures/DisplacementFlat.tga.meta new file mode 100644 index 000000000..7460464cf --- /dev/null +++ b/Assets/Textures/DisplacementFlat.tga.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 893f42b29b7fbe848beb68b6de22b4b1 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/DisplacementSharp.tga b/Assets/Textures/DisplacementSharp.tga new file mode 100644 index 000000000..4119a5ab2 --- /dev/null +++ b/Assets/Textures/DisplacementSharp.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67d732cfd55122de0a5926805c125802dba1d22e03a0c71d73333fceba8d05b4 +size 1048594 diff --git a/Assets/Textures/DisplacementSharp.tga.meta b/Assets/Textures/DisplacementSharp.tga.meta new file mode 100644 index 000000000..2e9dc98fb --- /dev/null +++ b/Assets/Textures/DisplacementSharp.tga.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 4b4cbcb0e1f21fa4ab58478c955db38e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/DisplacementSmooth.tga b/Assets/Textures/DisplacementSmooth.tga new file mode 100644 index 000000000..26af68269 --- /dev/null +++ b/Assets/Textures/DisplacementSmooth.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54bafa1c4cd6cf1161d9f369116082d00a8be45b7bea62ff1c0c50b7b387f80b +size 1048594 diff --git a/Assets/Textures/DisplacementSmooth.tga.meta b/Assets/Textures/DisplacementSmooth.tga.meta new file mode 100644 index 000000000..46452b9a4 --- /dev/null +++ b/Assets/Textures/DisplacementSmooth.tga.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 0738b240b3b8bc34e845274621c896cc +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/Gamecult logo.png b/Assets/Textures/Gamecult logo.png similarity index 100% rename from Assets/Resources/Sprites/Gamecult logo.png rename to Assets/Textures/Gamecult logo.png diff --git a/Assets/Resources/Sprites/Gamecult logo.png.meta b/Assets/Textures/Gamecult logo.png.meta similarity index 85% rename from Assets/Resources/Sprites/Gamecult logo.png.meta rename to Assets/Textures/Gamecult logo.png.meta index 869474f06..6ac57f9d6 100644 --- a/Assets/Resources/Sprites/Gamecult logo.png.meta +++ b/Assets/Textures/Gamecult logo.png.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 guid: a3111ffffbc60c748932a62f95e5581e TextureImporter: - fileIDToRecycleName: {} + internalIDToNameTable: [] externalObjects: {} - serializedVersion: 9 + serializedVersion: 11 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -23,6 +23,7 @@ TextureImporter: isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -54,11 +55,15 @@ TextureImporter: textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 platformSettings: - - serializedVersion: 2 + - serializedVersion: 3 buildTarget: DefaultTexturePlatform maxTextureSize: 1024 resizeAlgorithm: 0 @@ -69,7 +74,8 @@ TextureImporter: allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 - - serializedVersion: 2 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 buildTarget: Standalone maxTextureSize: 1024 resizeAlgorithm: 0 @@ -80,7 +86,8 @@ TextureImporter: allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 - - serializedVersion: 2 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 buildTarget: WebGL maxTextureSize: 1024 resizeAlgorithm: 0 @@ -91,6 +98,7 @@ TextureImporter: allowsAlphaSplitting: 0 overridden: 0 androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 spriteSheet: serializedVersion: 2 sprites: [] @@ -98,10 +106,12 @@ TextureImporter: physicsShape: [] bones: [] spriteID: 40ef633a86d22f249901044fc80039c9 + internalID: 0 vertices: [] indices: edges: [] weights: [] + secondaryTextures: [] spritePackingTag: pSDRemoveMatte: 0 pSDShowRemoveMatteOption: 0 diff --git a/Assets/Textures/Hex0.png b/Assets/Textures/Hex0.png new file mode 100644 index 000000000..4cc77a099 --- /dev/null +++ b/Assets/Textures/Hex0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0fd91e1c2100ae2ecd3278a51e9f864c74ed4334132be85c5929c8465ce20a0 +size 122778 diff --git a/Assets/Textures/Hex0.png.meta b/Assets/Textures/Hex0.png.meta new file mode 100644 index 000000000..e0abed622 --- /dev/null +++ b/Assets/Textures/Hex0.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 3c5a69061965c0e469be9769a1a01658 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/Hex1.png b/Assets/Textures/Hex1.png new file mode 100644 index 000000000..158c4dc7d --- /dev/null +++ b/Assets/Textures/Hex1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66eaa72079088831889da0a013b797ae5f36ae4cebb934f1af0dde45571092bb +size 122778 diff --git a/Assets/Textures/Hex1.png.meta b/Assets/Textures/Hex1.png.meta new file mode 100644 index 000000000..69cdf5e9b --- /dev/null +++ b/Assets/Textures/Hex1.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 5b9e5d65521cacb439fcc80f00ef6f65 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sprites/asteroids.png b/Assets/Textures/asteroids.png similarity index 100% rename from Assets/Resources/Sprites/asteroids.png rename to Assets/Textures/asteroids.png diff --git a/Assets/Resources/Sprites/asteroids.png.meta b/Assets/Textures/asteroids.png.meta similarity index 100% rename from Assets/Resources/Sprites/asteroids.png.meta rename to Assets/Textures/asteroids.png.meta diff --git a/Assets/Resources/Sprites/starfield.jpg b/Assets/Textures/starfield.jpg similarity index 100% rename from Assets/Resources/Sprites/starfield.jpg rename to Assets/Textures/starfield.jpg diff --git a/Assets/Resources/Sprites/starfield.jpg.meta b/Assets/Textures/starfield.jpg.meta similarity index 100% rename from Assets/Resources/Sprites/starfield.jpg.meta rename to Assets/Textures/starfield.jpg.meta diff --git a/Assets/Resources/Sprites/stripe.png b/Assets/Textures/stripe.png similarity index 100% rename from Assets/Resources/Sprites/stripe.png rename to Assets/Textures/stripe.png diff --git a/Assets/Resources/Sprites/stripe.png.meta b/Assets/Textures/stripe.png.meta similarity index 100% rename from Assets/Resources/Sprites/stripe.png.meta rename to Assets/Textures/stripe.png.meta diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSoundSeedAir.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSoundSeedAir.dll.meta index c974f475c..34d452d35 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSoundSeedAir.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSoundSeedAir.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: None userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSoundSeedGrain.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSoundSeedGrain.dll.meta index 927510608..0d9c9032b 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSoundSeedGrain.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSoundSeedGrain.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: None userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSynthOne.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSynthOne.dll.meta index f097bebd9..acd36581c 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSynthOne.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/AkSynthOne.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: None userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/McDSP.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/McDSP.dll.meta index 6fa4b4764..0d264d61f 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/McDSP.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/McDSP.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: None userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/iZotope.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/iZotope.dll.meta index d9591f1d2..c5f8c40ab 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/iZotope.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/iZotope.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: None userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/Profile/AkSoundEngine.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/Profile/AkSoundEngine.dll.meta index fcec87d23..8b69f8cdc 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86/Profile/AkSoundEngine.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86/Profile/AkSoundEngine.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: None userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSoundSeedAir.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSoundSeedAir.dll.meta index b672c3e8b..244390d0d 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSoundSeedAir.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSoundSeedAir.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: AnyCPU userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSoundSeedGrain.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSoundSeedGrain.dll.meta index 5ae411c91..65446f12b 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSoundSeedGrain.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSoundSeedGrain.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: AnyCPU userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSynthOne.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSynthOne.dll.meta index bd02f169b..d3ecdfc1b 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSynthOne.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/AkSynthOne.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: AnyCPU userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/McDSP.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/McDSP.dll.meta index e0f3da498..e5d32a9d3 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/McDSP.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/McDSP.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: AnyCPU userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/iZotope.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/iZotope.dll.meta index d3bd72b53..f82375dbe 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/iZotope.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/iZotope.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: AnyCPU userData: diff --git a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/Profile/AkSoundEngine.dll.meta b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/Profile/AkSoundEngine.dll.meta index 843347a5d..84fa89af4 100644 --- a/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/Profile/AkSoundEngine.dll.meta +++ b/Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/Profile/AkSoundEngine.dll.meta @@ -45,7 +45,7 @@ PluginImporter: - first: Standalone: Win64 second: - enabled: 1 + enabled: 0 settings: CPU: AnyCPU userData: diff --git a/GameData/Narrative/Locations/Corvus6.ink b/GameData/Narrative/Locations/Corvus6.ink2 similarity index 100% rename from GameData/Narrative/Locations/Corvus6.ink rename to GameData/Narrative/Locations/Corvus6.ink2 diff --git a/GameData/PlayerSettings.msgpack b/GameData/PlayerSettings.msgpack index 5debddd5a..0ae79375c 100644 --- a/GameData/PlayerSettings.msgpack +++ b/GameData/PlayerSettings.msgpack @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8ec655815a6da83aebc8c9c475cca8893dd2c03d1c27c1c0f572b3e254d8077 -size 36505 +oid sha256:7c83abaebc4b7fdfb0b53cb926bee1d42413eaf8c142fe992d016619e9804859 +size 28519