From ef47cb19b0862df0a525c9264e98bb02fe455f14 Mon Sep 17 00:00:00 2001 From: "Lennart R." Date: Wed, 27 Aug 2025 21:53:17 +0200 Subject: [PATCH] lighting++ --- Assets/Materials/Grass LOD 1.mat | 1 + Assets/Materials/Grass LOD 2.mat | 1 + Assets/Materials/Grass LOD 3.mat | 2 + Assets/Materials/Grass.mat | 20 ++- Assets/Scenes/SampleScene.unity | 125 +++++++++++++- Assets/Scripts/FreeCam.cs | 19 +++ Assets/Scripts/FreeCam.cs.meta | 11 ++ Assets/Shaders/GrassBlade.shader | 13 ++ Assets/Shaders/SkyColorTestShader.shader | 46 +++++ Assets/Shaders/SkyColorTestShader.shader.meta | 9 + Assets/Shaders/SkyTest.mat | 83 +++++++++ Assets/Shaders/SkyTest.mat.meta | 8 + Assets/Shaders/include/GrassBladePass.hlsl | 159 ++++++++++++------ Assets/Shaders/include/LodSettings.hlsl | 9 + Assets/Shaders/include/LodSettings.hlsl.meta | 7 + Assets/Textures/Sky.mat | 91 ++++++++++ Assets/Textures/Sky.mat.meta | 8 + Assets/Textures/SkyMaterial.mat | 115 +++++++++++++ Assets/Textures/SkyMaterial.mat.meta | 8 + Assets/Textures/grassblade.png | 3 + Assets/Textures/grassblade.png.meta | 114 +++++++++++++ Assets/Textures/meadow_2_8k.exr | 3 + Assets/Textures/meadow_2_8k.exr.meta | 114 +++++++++++++ Packages/packages-lock.json | 4 +- 24 files changed, 917 insertions(+), 56 deletions(-) create mode 100644 Assets/Scripts/FreeCam.cs create mode 100644 Assets/Scripts/FreeCam.cs.meta create mode 100644 Assets/Shaders/SkyColorTestShader.shader create mode 100644 Assets/Shaders/SkyColorTestShader.shader.meta create mode 100644 Assets/Shaders/SkyTest.mat create mode 100644 Assets/Shaders/SkyTest.mat.meta create mode 100644 Assets/Shaders/include/LodSettings.hlsl create mode 100644 Assets/Shaders/include/LodSettings.hlsl.meta create mode 100644 Assets/Textures/Sky.mat create mode 100644 Assets/Textures/Sky.mat.meta create mode 100644 Assets/Textures/SkyMaterial.mat create mode 100644 Assets/Textures/SkyMaterial.mat.meta create mode 100644 Assets/Textures/grassblade.png create mode 100644 Assets/Textures/grassblade.png.meta create mode 100644 Assets/Textures/meadow_2_8k.exr create mode 100644 Assets/Textures/meadow_2_8k.exr.meta diff --git a/Assets/Materials/Grass LOD 1.mat b/Assets/Materials/Grass LOD 1.mat index 67b7e38..c1eb489 100644 --- a/Assets/Materials/Grass LOD 1.mat +++ b/Assets/Materials/Grass LOD 1.mat @@ -26,6 +26,7 @@ Material: m_TexEnvs: [] m_Ints: [] m_Floats: + - _AOStrength: 1.605 - _LOD: 1 m_Colors: [] m_BuildTextureStacks: [] diff --git a/Assets/Materials/Grass LOD 2.mat b/Assets/Materials/Grass LOD 2.mat index 6c4c222..19b94ca 100644 --- a/Assets/Materials/Grass LOD 2.mat +++ b/Assets/Materials/Grass LOD 2.mat @@ -26,6 +26,7 @@ Material: m_TexEnvs: [] m_Ints: [] m_Floats: + - _AOStrength: 1.21 - _LOD: 2 m_Colors: [] m_BuildTextureStacks: [] diff --git a/Assets/Materials/Grass LOD 3.mat b/Assets/Materials/Grass LOD 3.mat index 647b166..a0ad12d 100644 --- a/Assets/Materials/Grass LOD 3.mat +++ b/Assets/Materials/Grass LOD 3.mat @@ -26,6 +26,8 @@ Material: m_TexEnvs: [] m_Ints: [] m_Floats: + - _AOStrength: 1.004 + - _BladeWidth: 0.0367 - _LOD: 3 m_Colors: [] m_BuildTextureStacks: [] diff --git a/Assets/Materials/Grass.mat b/Assets/Materials/Grass.mat index 1ec47f8..2be98ad 100644 --- a/Assets/Materials/Grass.mat +++ b/Assets/Materials/Grass.mat @@ -23,15 +23,31 @@ Material: m_LockedProperties: m_SavedProperties: serializedVersion: 3 - m_TexEnvs: [] + m_TexEnvs: + - _BladeWidthTex: + m_Texture: {fileID: 2800000, guid: bbec7f79ed7356243ae0604d95144b77, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FrabVarianz: + m_Texture: {fileID: 2800000, guid: 9bb4e817f09d0ea4cbab03f772e01910, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AOStrength: 1.697 - _BendStrength: 1 - - _BladeWidth: 0.03 + - _BladeBow: 0.195 + - _BladeWidth: 0.0274 + - _BladeWidthTexStrength: 1 - _LOD: 0 + - _Metallic: 0 + - _Roughness: 0 + - _SSSStrength: 1 + - _Translucency: 1.81 m_Colors: - _Color0: {r: 0.5882353, g: 1, b: 0.5882353, a: 1} - _Color1: {r: 1, g: 0.8209069, b: 0.495283, a: 1} - _Color2: {r: 1, g: 0.49831352, b: 0.21226418, a: 1} - _Color3: {r: 0.7075472, g: 0.15018693, b: 0.15018693, a: 1} + - _InnerColor: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 66aeec2..071391c 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -26,7 +26,7 @@ RenderSettings: m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_SkyboxMaterial: {fileID: 2100000, guid: f7fed0d42bbd24c4380b82a2d4419910, type: 2} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 @@ -102744,13 +102744,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 705507993} serializedVersion: 2 - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalRotation: {x: -0.29733634, y: -0.4906664, z: 0.7961714, w: -0.19222052} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} + m_LocalEulerAnglesHint: {x: 116.412, y: -219.815, z: 1.8419952} --- !u!43 &705514487 Mesh: m_ObjectHideFlags: 0 @@ -140789,6 +140789,7 @@ GameObject: - component: {fileID: 963194228} - component: {fileID: 963194227} - component: {fileID: 963194226} + - component: {fileID: 963194229} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -140870,6 +140871,18 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 29.7, y: 46.96, z: 0} +--- !u!114 &963194229 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 78c9485abe801d74184e00172d4b42c4, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!43 &963631122 Mesh: m_ObjectHideFlags: 0 @@ -240994,6 +241007,111 @@ Mesh: offset: 0 size: 0 path: +--- !u!1 &1663409491 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1663409495} + - component: {fileID: 1663409494} + - component: {fileID: 1663409493} + - component: {fileID: 1663409492} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1663409492 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1663409491} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1663409493 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1663409491} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 944161d6703f1e244a9216da9f82501b, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1663409494 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1663409491} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1663409495 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1663409491} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 7.656, y: 0.872, z: 0.544} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!43 &1663750196 Mesh: m_ObjectHideFlags: 0 @@ -308604,3 +308722,4 @@ SceneRoots: - {fileID: 2016058937} - {fileID: 513204364} - {fileID: 934953871} + - {fileID: 1663409495} diff --git a/Assets/Scripts/FreeCam.cs b/Assets/Scripts/FreeCam.cs new file mode 100644 index 0000000..da54d22 --- /dev/null +++ b/Assets/Scripts/FreeCam.cs @@ -0,0 +1,19 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class FreeCam : MonoBehaviour +{ + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + transform.eulerAngles += new Vector3(-Input.GetAxis("Mouse Y"), Input.GetAxis("Mouse X"), 0); + transform.position += (transform.forward * Input.GetAxis("Vertical") + transform.right * Input.GetAxis("Horizontal")) * Time.deltaTime * 10f; + } +} diff --git a/Assets/Scripts/FreeCam.cs.meta b/Assets/Scripts/FreeCam.cs.meta new file mode 100644 index 0000000..b2b026b --- /dev/null +++ b/Assets/Scripts/FreeCam.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 78c9485abe801d74184e00172d4b42c4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/GrassBlade.shader b/Assets/Shaders/GrassBlade.shader index bbef969..094ea57 100644 --- a/Assets/Shaders/GrassBlade.shader +++ b/Assets/Shaders/GrassBlade.shader @@ -4,6 +4,19 @@ _BladeWidth("Blade Width", Range(0.003, .1)) = 0.01 _BendStrength("Bend Strength", Range(0, 1)) = 1 + + _FrabVarianz("Farb Varianz", 2D) = "white" {} + _BladeWidthTex("Blade Width Texture", 2D) = "white" {} + + _AOStrength("Ambient Occlusion Strength", Range(0,2)) = 1 + _Translucency("Translucency", Range(0,5)) = 1 + _SSSStrength("Subsurface Scattering Strength", Range(0,1)) = 1 + _Metallic("Metallic", Range(0,1)) = 0 + _Roughness("Roughness", Range(0,1)) = 0.3 + _BladeBow("Blade Bow", Range(0,1)) = 0.3 + _BladeWidthTexStrength("BladeWidthTexStrength", Range(0,1)) = 0.3 + _InnerColor("Inner Color", Color) = (1,1,1,1) + _Color0("Color LOD 0", Color) = (0.3, 1.0, 0.3, 1.0) _Color1("Color LOD 1", Color) = (1.0, 0.7, 0.3, 1.0) _Color2("Color LOD 2", Color) = (1.0, 0.3, 0.1, 1.0) diff --git a/Assets/Shaders/SkyColorTestShader.shader b/Assets/Shaders/SkyColorTestShader.shader new file mode 100644 index 0000000..bb3bcf6 --- /dev/null +++ b/Assets/Shaders/SkyColorTestShader.shader @@ -0,0 +1,46 @@ +Shader "Unlit/SkyColorTestShader" +{ + SubShader + { + Pass + { + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct v2f { + half3 worldRefl : TEXCOORD0; + float4 pos : SV_POSITION; + }; + + v2f vert (float4 vertex : POSITION, float3 normal : NORMAL) + { + v2f o; + o.pos = UnityObjectToClipPos(vertex); + // compute world space position of the vertex + float3 worldPos = mul(unity_ObjectToWorld, vertex).xyz; + // compute world space view direction + float3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); + // world space normal + float3 worldNormal = UnityObjectToWorldNormal(normal); + // world space reflection vector + o.worldRefl = reflect(-worldViewDir, worldNormal); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + // sample the default reflection cubemap, using the reflection vector + half4 skyData = UNITY_SAMPLE_TEXCUBE(unity_SpecCube0, i.worldRefl); + // decode cubemap data into actual color + half3 skyColor = DecodeHDR (skyData, unity_SpecCube0_HDR); + // output it! + fixed4 c = 0; + c.rgb = skyColor; + return c; + } + ENDHLSL + } + } +} diff --git a/Assets/Shaders/SkyColorTestShader.shader.meta b/Assets/Shaders/SkyColorTestShader.shader.meta new file mode 100644 index 0000000..6f87980 --- /dev/null +++ b/Assets/Shaders/SkyColorTestShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 633e3c163a26aee4395de6b81b1aae3b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/SkyTest.mat b/Assets/Shaders/SkyTest.mat new file mode 100644 index 0000000..a11d4ba --- /dev/null +++ b/Assets/Shaders/SkyTest.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SkyTest + m_Shader: {fileID: 4800000, guid: 633e3c163a26aee4395de6b81b1aae3b, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _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} + - _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} + - _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_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Shaders/SkyTest.mat.meta b/Assets/Shaders/SkyTest.mat.meta new file mode 100644 index 0000000..a379499 --- /dev/null +++ b/Assets/Shaders/SkyTest.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 944161d6703f1e244a9216da9f82501b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/include/GrassBladePass.hlsl b/Assets/Shaders/include/GrassBladePass.hlsl index d5a82f0..1865a28 100644 --- a/Assets/Shaders/include/GrassBladePass.hlsl +++ b/Assets/Shaders/include/GrassBladePass.hlsl @@ -1,6 +1,8 @@ // Material Properties float _BladeWidth, _BendStrength; -float4 _Color0, _Color1, _Color2, _Color3; +float4 _Color0, _Color1, _Color2, _Color3, _InnerColor; +float _SegmentsMinusOne, _FieldSize, _AOStrength, _Translucency, _SSSStrength, _Metallic, _Roughness, _BladeBow, _MaxBladeHeight, _HighlightStrength, _BladeWidthTexStrength; +sampler2D _FrabVarianz, _BladeWidthTex; float2 _TransitionRange; @@ -21,6 +23,8 @@ struct v2g { struct g2f { float4 pos : SV_POSITION; #ifdef IS_IN_BASE_PASS + float3 normal : NORMAL; + float3 worldPos : TEXCOORD3; float2 uv : TEXCOORD0; // bottom left 0.0 top right 1.1 (values converge - 0 and 1 meet at the tip) SHADOW_COORDS(1) // put shadows data into TEXCOORD1 float transitionInterpolator : TEXCOORD2; @@ -97,12 +101,17 @@ void geom(point v2g IN[1], inout TriangleStream triStream) { #elif _LOD_LOD_3 int numSegments = 1; #endif + + float3 localCameraPos = mul(unity_WorldToObject, float4(_WorldSpaceCameraPos.xyz, 1.0)).xyz; + for (int i = 0; i < numSegments; i++) { const float lowerThickness = 0.8; // LOD 3 has a different algorithm #if _LOD_LOD_3 { + + const float segmentWidth = halfWidth * pow(sin(lowerThickness * 3.141), .8); const float3 widthOffset = getWidthOffset(segmentWidth, tipOffset.xz) * max(1, cameraDistance / 10); float3 segmentCenterBase = basePos; @@ -111,37 +120,63 @@ void geom(point v2g IN[1], inout TriangleStream triStream) { const float3 vertRightBase = segmentCenterBase - widthOffset * 2.5; const float3 vertLeftTip = segmentCenterTip + widthOffset * 0.4; const float3 vertRightTip = segmentCenterTip - widthOffset * 0.4; + + const float3 surfTangent1 = vertLeftBase - vertLeftTip; + const float3 surfTangent2 = vertLeftBase - vertRightBase; + const float3 normal = normalize(cross(surfTangent1, surfTangent2)); // TODO remove normalize + float3 normalWS = UnityObjectToWorldNormal(normal); + + + const float3 camVec = normalize(vertLeftBase - localCameraPos); + + // at which side of the blade are we looking? + const bool lookingFromAbove = dot(camVec, normalWS) > 0; + if (lookingFromAbove) { + normalWS = -normalWS; + } + + //normalWS = float3(1,1,1) * lookingFromAbove; + //normalWS = basePosWS - _WorldSpaceCameraPos.xyz; + //normalWS = camVec; o.pos = UnityObjectToClipPos(vertLeftBase); - #ifdef IS_IN_BASE_PASS + #ifndef IS_IN_SHADOW_PASS o.uv = float2(0, 0); TRANSFER_SHADOW(o) o.transitionInterpolator = interpolator; + o.normal = normalWS; + o.worldPos = mul(unity_ObjectToWorld, vertLeftBase).xyz; #endif triStream.Append(o); o.pos = UnityObjectToClipPos(vertRightBase); - #ifdef IS_IN_BASE_PASS + #ifndef IS_IN_SHADOW_PASS o.uv = float2(1, 0); TRANSFER_SHADOW(o) o.transitionInterpolator = interpolator; + o.normal = normalWS; + o.worldPos = mul(unity_ObjectToWorld, vertRightBase).xyz; #endif triStream.Append(o); o.pos = UnityObjectToClipPos(vertLeftTip); - #ifdef IS_IN_BASE_PASS + #ifndef IS_IN_SHADOW_PASS o.uv = float2(0, 1); TRANSFER_SHADOW(o) o.transitionInterpolator = interpolator; + o.normal = normalWS; + o.worldPos = mul(unity_ObjectToWorld, vertLeftTip).xyz; #endif triStream.Append(o); o.pos = UnityObjectToClipPos(vertRightTip); - #ifdef IS_IN_BASE_PASS + #ifndef IS_IN_SHADOW_PASS o.uv = float2(1, 1); TRANSFER_SHADOW(o) o.transitionInterpolator = interpolator; + o.normal = normalWS; + o.worldPos = mul(unity_ObjectToWorld, vertRightTip).xyz; #endif triStream.Append(o); } @@ -160,20 +195,17 @@ void geom(point v2g IN[1], inout TriangleStream triStream) { const float3 vertLeft = segmentCenter + widthOffset; const float3 vertRight = segmentCenter - widthOffset; - // const float3 nextSegmentCenter = basePos + bendParabula(tipPos, nextSegmentHeight01); + //const float3 nextSegmentCenter = basePos + bendParabula(tipPos, nextSegmentHeight01); -#ifdef IS_IN_BASE_PASS +#ifndef IS_IN_SHADOW_PASS // calculate normal const float3 surfTangent1 = previousSegmentCenter - segmentCenter; const float3 surfTangent2 = previousSegmentCenter - vertLeft; const float3 normal = normalize(cross(surfTangent1, surfTangent2)); // TODO remove normalize float3 normalWS = UnityObjectToWorldNormal(normal); -#if UNITY_EDITOR - const float3 camVec = normalize(segmentCenter - _WorldSpaceCameraPosEditor.xyz); -#else - const float3 camVec = normalize(segmentCenter - _WorldSpaceCameraPos.xyz); -#endif + + const float3 camVec = normalize(segmentCenter - localCameraPos); // at which side of the blade are we looking? const bool lookingFromAbove = dot(camVec, normalWS) > 0; @@ -182,63 +214,92 @@ void geom(point v2g IN[1], inout TriangleStream triStream) { } #endif o.pos = UnityObjectToClipPos(vertLeft); -#ifdef IS_IN_BASE_PASS +#ifndef IS_IN_SHADOW_PASS o.uv = float2(0, segmentHeightNormalized); TRANSFER_SHADOW(o) o.transitionInterpolator = interpolator; -#endif + o.normal = normalize(lerp(normalWS, UnityObjectToWorldNormal(normalize(widthOffset)), _BladeBow)); + o.worldPos = mul(unity_ObjectToWorld, vertLeft).xyz; +#endif triStream.Append(o); o.pos = UnityObjectToClipPos(vertRight); -#ifdef IS_IN_BASE_PASS +#ifndef IS_IN_SHADOW_PASS o.uv = float2(1, segmentHeightNormalized); TRANSFER_SHADOW(o) + o.transitionInterpolator = interpolator; + o.normal = normalize(lerp(normalWS, UnityObjectToWorldNormal(-normalize(widthOffset)), _BladeBow)); + o.worldPos = mul(unity_ObjectToWorld, vertRight).xyz; #endif triStream.Append(o); - previousSegmentCenter = segmentCenterSnapshot; } - - o.pos = UnityObjectToClipPos(basePos + tipOffset * float3(_BendStrength,1,_BendStrength)); -#ifdef IS_IN_BASE_PASS + + o.pos = UnityObjectToClipPos(basePos + tipOffset * float3(_BendStrength, 1, _BendStrength)); +#ifndef IS_IN_SHADOW_PASS o.uv = float2(.5, 1); TRANSFER_SHADOW(o) o.transitionInterpolator = interpolator; + o.normal = o.normal > 0 ? float3(0, 1, 0) : float3(0, -1, 0); #endif triStream.Append(o); } float4 frag(g2f i) : SV_Target{ -#ifdef IS_IN_SHADOW_PASS + + #ifndef IS_IN_SHADOW_PASS + + float3 worldNormal = normalize(i.normal); + float3 lightDirection = normalize(_WorldSpaceLightPos0.xyz); + + + half3 worldViewDir = normalize(UnityWorldSpaceViewDir(i.worldPos)); + half3 worldRefl = reflect(-worldViewDir, worldNormal); + + // same as in previous shader + half4 skyData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, worldRefl, 0); + half3 skyColor = DecodeHDR(skyData, unity_SpecCube0_HDR); + + float3 lightReflectDirection = reflect(-lightDirection, worldNormal); + float3 viewDirection = normalize(float3(float4(_WorldSpaceCameraPos.xyz, 1.0) - i.worldPos.xyz)); + + float atten = 1.0; + + float3 translucency = atten * _LightColor0.xyz * max(0.0, dot(worldNormal, -lightDirection)) * _Translucency; + float3 subsurf = max(0.0, dot(lightReflectDirection, -viewDirection)) * _SSSStrength * _InnerColor; + const fixed shadow = SHADOW_ATTENUATION(i); + + float3 lightFinal = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, worldNormal, 2.0); + lightFinal += translucency; + lightFinal += subsurf; + lightFinal *= max(.35, shadow); + lightFinal *= 1.0; + + fixed4 middleCol = min(1, abs(i.uv.x - 0.5) * 1); + fixed4 col = max(0.87, pow(middleCol, .01)); + fixed4 farbvarianz = tex2Dlod(_FrabVarianz, float4(i.worldPos.xz / 40, 0, 3)); + fixed4 farbvarianz2 = tex2Dlod(_FrabVarianz, float4(i.worldPos.xz / 10, 0, 3)); + fixed4 farbvarianz3 = tex2Dlod(_FrabVarianz, float4(i.worldPos.xz / 3, 0, 3)); + fixed4 bladeWidthTex = tex2Dlod(_BladeWidthTex, float4(i.uv.x, 0, 0, 3)); + + fixed4 albedo = lerp(farbvarianz2, farbvarianz3, 0.4); + albedo = lerp(albedo, farbvarianz, _Metallic) * 0.7; + albedo *= 1 + _AOStrength; + albedo *= lerp(1, bladeWidthTex.x * 2.5, _BladeWidthTexStrength); + + fixed3 color = fixed3(skyColor * max(.35, shadow) * .2 + lightFinal * albedo * col); + fixed3 highlightedColor = lerp(color, fixed3(2.5, 0.7, 0.5), 0.5); + fixed3 finalTestColor = albedo.xyz ; + + lightFinal = min(1.4, max(0.4, lightFinal)); + + return float4(lightFinal * albedo * 2, 0); + //return float4(worldNormal, 0); dot(worldNormal, lightDirection) + + #endif + + + return 0; -#else - - const float shadow = SHADOW_ATTENUATION(i); - - float light = i.uv.y; - light *= max(.35, shadow); -#if _LOD_LOD_1 - light = pow(light, 1 + 0.4 * i.transitionInterpolator); -#elif _LOD_LOD_2 - light = pow(light, 1.4); // fake shadow -#elif _LOD_LOD_3 - light = pow(light, 1.4) * 0.7; // fake shadow -#endif - - float3 albedo; -#if _LOD_LOD_0 - albedo = lerp(_Color0.xyz, _Color1.xyz, i.transitionInterpolator); -#elif _LOD_LOD_1 - albedo = lerp(_Color1.xyz, _Color2.xyz, i.transitionInterpolator); -#elif _LOD_LOD_2 - albedo = lerp(_Color2.xyz, _Color3.xyz, i.transitionInterpolator); -#elif _LOD_LOD_3 - albedo = _Color3.xyz; -#endif - albedo = _Color0.xyz; - - return float4(light * albedo, 1); - -#endif } diff --git a/Assets/Shaders/include/LodSettings.hlsl b/Assets/Shaders/include/LodSettings.hlsl new file mode 100644 index 0000000..71c4150 --- /dev/null +++ b/Assets/Shaders/include/LodSettings.hlsl @@ -0,0 +1,9 @@ +#if _LOD_LOD_0 +static const int LOD_Settings_MaxVertexCount = 4 + (11 - 1) * 2; +#elif _LOD_LOD_1 +static const int LOD_Settings_MaxVertexCount = 4 + (5 - 1) * 2; +#elif _LOD_LOD_2 +static const int LOD_Settings_MaxVertexCount = 4 + (2 - 1) * 2; +#elif _LOD_LOD_3 +static const int LOD_Settings_MaxVertexCount = 4; +#endif \ No newline at end of file diff --git a/Assets/Shaders/include/LodSettings.hlsl.meta b/Assets/Shaders/include/LodSettings.hlsl.meta new file mode 100644 index 0000000..e806372 --- /dev/null +++ b/Assets/Shaders/include/LodSettings.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 69bca620869c1be49ab3923760b0f54e +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/Sky.mat b/Assets/Textures/Sky.mat new file mode 100644 index 0000000..ff52362 --- /dev/null +++ b/Assets/Textures/Sky.mat @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Sky + m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _SUNDISK_HIGH_QUALITY + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _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} + - _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} + - _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_Ints: [] + m_Floats: + - _AtmosphereThickness: 1 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Exposure: 1.3 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SunDisk: 2 + - _SunSize: 0.04 + - _SunSizeConvergence: 5 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GroundColor: {r: 0.36899996, g: 0.34899998, b: 0.34099993, a: 1} + - _SkyTint: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Textures/Sky.mat.meta b/Assets/Textures/Sky.mat.meta new file mode 100644 index 0000000..7aceabb --- /dev/null +++ b/Assets/Textures/Sky.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 967dc044d8b045249a066f976e49b618 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/SkyMaterial.mat b/Assets/Textures/SkyMaterial.mat new file mode 100644 index 0000000..257f192 --- /dev/null +++ b/Assets/Textures/SkyMaterial.mat @@ -0,0 +1,115 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SkyMaterial + m_Shader: {fileID: 108, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: + - _MAPPING_LATITUDE_LONGITUDE_LAYOUT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BackTex: + m_Texture: {fileID: 0} + 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} + - _DownTex: + m_Texture: {fileID: 0} + 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} + - _FrontTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LeftTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: f975e26f1cba97148b6eeaf5d851f7f9, type: 3} + 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} + - _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} + - _RightTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UpTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Exposure: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _ImageType: 0 + - _Layout: 0 + - _Mapping: 1 + - _Metallic: 0 + - _MirrorOnBack: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Rotation: 0 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + m_BuildTextureStacks: [] diff --git a/Assets/Textures/SkyMaterial.mat.meta b/Assets/Textures/SkyMaterial.mat.meta new file mode 100644 index 0000000..3202de0 --- /dev/null +++ b/Assets/Textures/SkyMaterial.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f7fed0d42bbd24c4380b82a2d4419910 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/grassblade.png b/Assets/Textures/grassblade.png new file mode 100644 index 0000000..0d5485a --- /dev/null +++ b/Assets/Textures/grassblade.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad2bfbfe5b6ddfda0d53ebd36e05caaf86d82f336ee4313bd47fb59abbde6bca +size 4563 diff --git a/Assets/Textures/grassblade.png.meta b/Assets/Textures/grassblade.png.meta new file mode 100644 index 0000000..4eea1f3 --- /dev/null +++ b/Assets/Textures/grassblade.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: bbec7f79ed7356243ae0604d95144b77 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + 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 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + 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 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/meadow_2_8k.exr b/Assets/Textures/meadow_2_8k.exr new file mode 100644 index 0000000..ea41436 --- /dev/null +++ b/Assets/Textures/meadow_2_8k.exr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25efd519a3c98c4f23e60a0f12adaa3b10dc04db39eba85adb9b6ee59a42f68c +size 92102655 diff --git a/Assets/Textures/meadow_2_8k.exr.meta b/Assets/Textures/meadow_2_8k.exr.meta new file mode 100644 index 0000000..1c97cad --- /dev/null +++ b/Assets/Textures/meadow_2_8k.exr.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: f975e26f1cba97148b6eeaf5d851f7f9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + 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 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + 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 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 3ba4940..ef88ddb 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -32,7 +32,7 @@ "com.unity.editorcoroutines": "1.0.0", "com.unity.performance.profile-analyzer": "1.2.3", "com.unity.test-framework": "1.1.33", - "com.unity.testtools.codecoverage": "1.2.5" + "com.unity.testtools.codecoverage": "1.2.6" } }, "com.unity.ide.rider": { @@ -102,7 +102,7 @@ "url": "https://packages.unity.com" }, "com.unity.testtools.codecoverage": { - "version": "1.2.5", + "version": "1.2.6", "depth": 1, "source": "registry", "dependencies": {