diff --git a/Assets/Fonts/NotoSansTC-Regular SDF.asset b/Assets/Fonts/NotoSansTC-Regular SDF.asset index 0fbb32c..65b5733 100644 --- a/Assets/Fonts/NotoSansTC-Regular SDF.asset +++ b/Assets/Fonts/NotoSansTC-Regular SDF.asset @@ -155,7 +155,7 @@ Material: - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - - _UnderlayColor: {r: 0, g: 0, b: 0, a: 1} + - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.7294118} m_BuildTextureStacks: [] --- !u!114 &11400000 MonoBehaviour: diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 3cb2593..1102010 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -1117,6 +1117,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 456a47e8e29ccff4b800fc02420f75ad, type: 3} m_Name: m_EditorClassIdentifier: + PrintBrightnessMultiplier: 1.2 renderTexture_postcard: {fileID: 8400000, guid: 35e8ac38ef95d18419a5a58ab9299adf, type: 2} renderTexture_share: {fileID: 8400000, guid: 91633495c7c9dd040b09afd52966b6d4, type: 2} OutputFolder: output @@ -1166,8 +1167,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 70, y: 0} - m_SizeDelta: {x: 140, y: 0} + m_AnchoredPosition: {x: 122.5, y: 0} + m_SizeDelta: {x: 245, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &366298495 MonoBehaviour: @@ -3412,8 +3413,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 511.7143, y: -140} - m_SizeDelta: {x: 170.57144, y: 0} + m_AnchoredPosition: {x: 783.4286, y: -245} + m_SizeDelta: {x: 261.14288, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &696492449 MonoBehaviour: @@ -3570,9 +3571,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 834012601375dd14aa63a60e116710ea, type: 3} m_Name: m_EditorClassIdentifier: - GradientEnd: 0.8 + GradientEnd: 1.5 LightPositionY: 1.25 - TopColor: {r: 1, g: 0.8584145, b: 0.5801887, a: 0.6666667} + TopColor: {r: 1, g: 0.8584145, b: 0.5801887, a: 0.49803922} BottomColor: {r: 0.5377358, g: 0.4067989, b: 0.24096651, a: 0} --- !u!114 &697235292 MonoBehaviour: @@ -4068,8 +4069,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 106.60715, y: 0} - m_SizeDelta: {x: 140, y: 0} + m_AnchoredPosition: {x: 163.2143, y: 0} + m_SizeDelta: {x: 245, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &830016229 MonoBehaviour: @@ -4764,8 +4765,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 70, y: 0} - m_SizeDelta: {x: 140, y: 0} + m_AnchoredPosition: {x: 122.5, y: 0} + m_SizeDelta: {x: 245, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1060364296 MonoBehaviour: @@ -5308,10 +5309,10 @@ RectTransform: - {fileID: 555167254} m_Father: {fileID: 1317646465} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 617.5, y: -70} - m_SizeDelta: {x: 0, y: 70} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 70, y: 0} m_Pivot: {x: 1, y: 0} --- !u!114 &1255800684 MonoBehaviour: @@ -6769,8 +6770,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 319.82144, y: 0} - m_SizeDelta: {x: 157.5, y: 0} + m_AnchoredPosition: {x: 489.64288, y: 0} + m_SizeDelta: {x: 275.625, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1811530096 MonoBehaviour: diff --git a/Assets/Scripts/OscHandler.cs b/Assets/Scripts/OscHandler.cs index 1fbc9fc..ced7c0b 100644 --- a/Assets/Scripts/OscHandler.cs +++ b/Assets/Scripts/OscHandler.cs @@ -263,7 +263,7 @@ public class OscHandler : MonoBehaviour } - private IEnumerator BreathFade(CanvasGroup canvasGroup, float maxAlpha=1f, float minAlpha=0.33f, + private IEnumerator BreathFade(CanvasGroup canvasGroup, float maxAlpha=1f, float minAlpha=0.5f, float fadeInDuration=1.2f, float fadeOutDuration=1.2f, int cycles=20) { for (int i = 0; i < cycles; i++) diff --git a/Assets/Scripts/SetLightStrength.cs b/Assets/Scripts/SetLightStrength.cs index 6a32b1f..30a13a9 100644 --- a/Assets/Scripts/SetLightStrength.cs +++ b/Assets/Scripts/SetLightStrength.cs @@ -39,7 +39,7 @@ public class SetLightStrength : MonoBehaviour if (material != null) { material.SetFloat("_GradientEnd", GradientEnd); - material.SetFloat("_LightPositionY", LightPositionY); + material.SetVector("_LightPosition", new float4(0.5f, LightPositionY, 0f, 0f)); material.SetColor("_TopColor", TopColor); material.SetColor("_BottomColor", BottomColor); } diff --git a/Assets/Scripts/UploadToGoogleDrive.cs b/Assets/Scripts/UploadToGoogleDrive.cs index e931d41..a2540fa 100644 --- a/Assets/Scripts/UploadToGoogleDrive.cs +++ b/Assets/Scripts/UploadToGoogleDrive.cs @@ -11,7 +11,7 @@ using Google.Apis.Services; public class UploadToGoogleDrive : MonoBehaviour { - + public float PrintBrightnessMultiplier = 1.2f; public class UploadRequest { public string uploadDest; @@ -121,17 +121,17 @@ public class UploadToGoogleDrive : MonoBehaviour discard = discard, default_image = default_image }; - StartCoroutine(ExportAfterFrame(latest_input)); -} + StartCoroutine(ExportAfterFrame(latest_input)); + } -private IEnumerator ExportAfterFrame(UploadRequest uploadRequest) -{ - // Wait for the end of the current frame, after all Update and LateUpdate calls have finished. - yield return new WaitForEndOfFrame(); + private IEnumerator ExportAfterFrame(UploadRequest uploadRequest) + { + // Wait for the end of the current frame, after all Update and LateUpdate calls have finished. + yield return new WaitForEndOfFrame(); - // Now, call the Export function. - Export(uploadRequest); -} + // Now, call the Export function. + Export(uploadRequest); + } public void Export(UploadRequest uploadRequest = null) { @@ -154,7 +154,7 @@ private IEnumerator ExportAfterFrame(UploadRequest uploadRequest) { return; } - + if (string.IsNullOrEmpty(filename)) { Debug.LogError("Filename cannot be null or empty."); @@ -196,6 +196,27 @@ private IEnumerator ExportAfterFrame(UploadRequest uploadRequest) Texture2D tex = new Texture2D(rt.width, rt.height, TextureFormat.RGBA32, false); tex.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0); + + // Apply gamma correction (sRGB conversion) to each pixel + for (int y = 0; y < tex.height; y++) + { + for (int x = 0; x < tex.width; x++) + { + Color linearColor = tex.GetPixel(x, y); + Color sRGBColor = new Color( + Mathf.LinearToGammaSpace(linearColor.r), + Mathf.LinearToGammaSpace(linearColor.g), + Mathf.LinearToGammaSpace(linearColor.b), + linearColor.a + ); + + sRGBColor.r *= PrintBrightnessMultiplier; +                sRGBColor.g *= PrintBrightnessMultiplier; + sRGBColor.b *= PrintBrightnessMultiplier; + + tex.SetPixel(x, y, sRGBColor); + } + } tex.Apply(); byte[] bytes = tex.EncodeToPNG(); @@ -223,7 +244,7 @@ private IEnumerator ExportAfterFrame(UploadRequest uploadRequest) void upload(string _uploadFile, string _fileId, string type, bool needToPrint = true) { - if(GoogleDriveUtils.service == null) + if (GoogleDriveUtils.service == null) { Debug.Log("service is null, setting up service again."); setupService(); @@ -250,7 +271,7 @@ private IEnumerator ExportAfterFrame(UploadRequest uploadRequest) if (type == "print") { - if(needToPrint) + if (needToPrint) writeToFirebase("prints", System.DateTime.Now.ToString("yyyyMMdd_hhmmss"), url, type); } else diff --git a/Assets/Shaders/Material-light.mat b/Assets/Shaders/Material-light.mat index 7d7e459..86cd5a7 100644 --- a/Assets/Shaders/Material-light.mat +++ b/Assets/Shaders/Material-light.mat @@ -68,7 +68,7 @@ Material: - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 - - _GradientEnd: 0.8 + - _GradientEnd: 1.5 - _Metallic: 0 - _Mode: 0 - _NoiseScale1: 12 @@ -78,13 +78,14 @@ Material: - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _Strength: 0.00052288384 + - _Strength: 0 - _UVSec: 0 - _ZWrite: 1 m_Colors: - _BottomColor: {r: 0.5377358, g: 0.4067989, b: 0.24096651, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _LightPostion: {r: 0.5, g: 1.5, b: 0, a: 0} - - _TopColor: {r: 1, g: 0.8584145, b: 0.5801887, a: 0.6666667} + - _LightPosition: {r: 0.5, g: 1.25, b: 0, a: 0} + - _LightPostion: {r: 0.5, g: 1.25, b: 0, a: 0} + - _TopColor: {r: 1, g: 0.8584145, b: 0.58018863, a: 0.49803922} m_BuildTextureStacks: [] diff --git a/Assets/Shaders/blur.shader b/Assets/Shaders/blur.shader index cdb1203..4795782 100644 --- a/Assets/Shaders/blur.shader +++ b/Assets/Shaders/blur.shader @@ -9,7 +9,7 @@ Shader "Unlit/LightEffect" _TopColor("Top Color", Color) = (1,1,1,1) _BottomColor("Bottom Color", Color) = (0,0,0,0) _GradientEnd("Gradient End Position", Range(0,1)) = 1 - _LightPostion("Light Position", Vector) = (0.5, 1.0, 0, 0) + _LightPosition("Light Position", Vector) = (0.5, 1.0, 0, 0) _NoiseScale1("Noise Scale 1", Float) = 12.0 _NoiseScale2("Noise Scale 2", Float) = 2.0 } @@ -45,7 +45,7 @@ Shader "Unlit/LightEffect" float4 _TopColor; float4 _BottomColor; float _GradientEnd; - float4 _LightPostion; + float4 _LightPosition; float _NoiseScale1; float _NoiseScale2; @@ -102,7 +102,7 @@ Shader "Unlit/LightEffect" // float t = saturate(i.uv.y / max(_GradientEnd, 0.0001)); // float2 center = float2(0.5, 1.0); float noiseValue = noise(i.uv*_NoiseScale1 + float2(_Time.x*1.3, _Time.y*0.2)); - float2 uvNorm = (i.uv - _LightPostion.xy + 0.1*float2(noiseValue, noiseValue)); + float2 uvNorm = (i.uv - _LightPosition.xy + 0.1*float2(noiseValue, noiseValue)); //uvNorm.x /= (_GradientEnd); // scale x to match circle aspect float dist = 1.0 - length(uvNorm); // dist=1.0-(pow(1.0 - dist, 2.0)); // Sharpen the edge diff --git a/Assets/Textures/DisplayTexture.renderTexture b/Assets/Textures/DisplayTexture.renderTexture index d66c17f..e780533 100644 --- a/Assets/Textures/DisplayTexture.renderTexture +++ b/Assets/Textures/DisplayTexture.renderTexture @@ -16,7 +16,7 @@ RenderTexture: serializedVersion: 5 m_Width: 1080 m_Height: 1920 - m_AntiAliasing: 1 + m_AntiAliasing: 8 m_MipCount: -1 m_DepthStencilFormat: 94 m_ColorFormat: 8 diff --git a/Assets/Textures/Postcard Texture.renderTexture b/Assets/Textures/Postcard Texture.renderTexture index afdaa43..b81aba6 100644 --- a/Assets/Textures/Postcard Texture.renderTexture +++ b/Assets/Textures/Postcard Texture.renderTexture @@ -16,13 +16,13 @@ RenderTexture: serializedVersion: 5 m_Width: 1241 m_Height: 1754 - m_AntiAliasing: 1 + m_AntiAliasing: 8 m_MipCount: -1 m_DepthStencilFormat: 94 - m_ColorFormat: 4 + m_ColorFormat: 8 m_MipMap: 0 m_GenerateMips: 1 - m_SRGB: 1 + m_SRGB: 0 m_UseDynamicScale: 0 m_BindMS: 0 m_EnableCompatibleFormat: 1 diff --git a/Assets/Textures/Share Texture.renderTexture b/Assets/Textures/Share Texture.renderTexture index 422fd1b..88cea3d 100644 --- a/Assets/Textures/Share Texture.renderTexture +++ b/Assets/Textures/Share Texture.renderTexture @@ -16,13 +16,13 @@ RenderTexture: serializedVersion: 5 m_Width: 1080 m_Height: 1920 - m_AntiAliasing: 1 + m_AntiAliasing: 8 m_MipCount: -1 m_DepthStencilFormat: 94 - m_ColorFormat: 4 + m_ColorFormat: 8 m_MipMap: 0 m_GenerateMips: 1 - m_SRGB: 1 + m_SRGB: 0 m_UseDynamicScale: 0 m_BindMS: 0 m_EnableCompatibleFormat: 1 diff --git a/Assets/Textures/SpoutInputTexture.renderTexture b/Assets/Textures/SpoutInputTexture.renderTexture index 895a369..b532275 100644 --- a/Assets/Textures/SpoutInputTexture.renderTexture +++ b/Assets/Textures/SpoutInputTexture.renderTexture @@ -16,7 +16,7 @@ RenderTexture: serializedVersion: 5 m_Width: 512 m_Height: 512 - m_AntiAliasing: 1 + m_AntiAliasing: 8 m_MipCount: -1 m_DepthStencilFormat: 94 m_ColorFormat: 59 diff --git a/Assets/Textures/SpoutOutputTexture.renderTexture b/Assets/Textures/SpoutOutputTexture.renderTexture index 00886cf..1bd9a28 100644 --- a/Assets/Textures/SpoutOutputTexture.renderTexture +++ b/Assets/Textures/SpoutOutputTexture.renderTexture @@ -16,7 +16,7 @@ RenderTexture: serializedVersion: 5 m_Width: 512 m_Height: 512 - m_AntiAliasing: 1 + m_AntiAliasing: 8 m_MipCount: -1 m_DepthStencilFormat: 0 m_ColorFormat: 8 diff --git a/Assets/Textures/VideoTexture.renderTexture b/Assets/Textures/VideoTexture.renderTexture index e01c64d..5ea85cb 100644 --- a/Assets/Textures/VideoTexture.renderTexture +++ b/Assets/Textures/VideoTexture.renderTexture @@ -16,7 +16,7 @@ RenderTexture: serializedVersion: 5 m_Width: 256 m_Height: 256 - m_AntiAliasing: 1 + m_AntiAliasing: 8 m_MipCount: -1 m_DepthStencilFormat: 94 m_ColorFormat: 8 diff --git a/Material/token.json/Google.Apis.Auth.OAuth2.Responses.TokenResponse-user b/Material/token.json/Google.Apis.Auth.OAuth2.Responses.TokenResponse-user index 1cc1144..135751d 100644 --- a/Material/token.json/Google.Apis.Auth.OAuth2.Responses.TokenResponse-user +++ b/Material/token.json/Google.Apis.Auth.OAuth2.Responses.TokenResponse-user @@ -1 +1 @@ -{"access_token":"ya29.a0AS3H6NxTo2AL8j0SLr4KTpeYurgScqMCuE-f76GyCxdD0-1XcS0b8UMGj8BBdsZM8OtjghVI2xwidFE0CzXNJB7aIl5upWbCCKNGsTz-yYtmLTYGWP9fZKgyJc_r7ZO_Pi1UjSA4akOofa8Ps2cvtRqFgIT5yOzik5o7fjJF977YBIc5J4jy6MfgPoRFnLculQ3j199baCgYKAR0SARESFQHGX2MiirKW6ocuL43XzDKEwrXDcA0207","token_type":"Bearer","expires_in":3599,"refresh_token":"1//0e-urCtqMVSK6CgYIARAAGA4SNwF-L9IrTWfNUsKFuBn8-mJmQxbXhkBlRW8776bD9xuFk1rFTaMH0dA9yRyESXHTchyXJDAJgkU","scope":"https://www.googleapis.com/auth/drive","Issued":"2025-09-13T11:10:22.416+08:00","IssuedUtc":"2025-09-13T03:10:22.416Z"} \ No newline at end of file +{"access_token":"ya29.a0AS3H6NyFVBEDi4XN5hswszzpP642SUWFSALfzA-Zn_xxA-BHd6sARV6_4xdwPOU6eq-FCYc-PTrMa1is1XXkuigjg66gluYqUdYgs3ai_mNgMY0q49nWBy9fE-jgH8F0lT9ZAaPyZomCnw-EKZZ2fmjvQIS3BsrtbLuBnXlaLlKz7smNPYn3oNzKxp6xDIZkFzRRBnhwaCgYKAWwSARESFQHGX2MitZVeQGetQ96x8A2Pd4z2_g0207","token_type":"Bearer","expires_in":3599,"refresh_token":"1//0e-urCtqMVSK6CgYIARAAGA4SNwF-L9IrTWfNUsKFuBn8-mJmQxbXhkBlRW8776bD9xuFk1rFTaMH0dA9yRyESXHTchyXJDAJgkU","scope":"https://www.googleapis.com/auth/drive","Issued":"2025-09-13T18:25:08.132+08:00","IssuedUtc":"2025-09-13T10:25:08.132Z"} \ No newline at end of file diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index 3ca0edc..27d8408 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -267,7 +267,7 @@ QualitySettings: globalTextureMipmapLimit: 0 textureMipmapLimitSettings: [] anisotropicTextures: 2 - antiAliasing: 2 + antiAliasing: 8 softParticles: 1 softVegetation: 1 realtimeReflectionProbes: 1