From e84947d3fc38763fe440bf000e295cb3d5231e37 Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Tue, 14 Feb 2023 23:16:05 +0100 Subject: [PATCH] fix transparency in screenshots --- Assets/sunset_box/sunset_box.unity | 13 ++----------- Assets/sunset_box/sunset_env_dynamic.shader | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Assets/sunset_box/sunset_box.unity b/Assets/sunset_box/sunset_box.unity index 0d3f0a7..c666e97 100644 --- a/Assets/sunset_box/sunset_box.unity +++ b/Assets/sunset_box/sunset_box.unity @@ -311,7 +311,6 @@ GameObject: m_Component: - component: {fileID: 1963847632} - component: {fileID: 1963847631} - - component: {fileID: 1963847630} - component: {fileID: 1963847633} m_Layer: 0 m_Name: Main Camera @@ -320,14 +319,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!81 &1963847630 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1963847629} - m_Enabled: 1 --- !u!20 &1963847631 Camera: m_ObjectHideFlags: 0 @@ -338,7 +329,7 @@ Camera: m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 1} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 @@ -379,7 +370,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1963847629} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -0.8} + m_LocalPosition: {x: 0, y: 0.25, z: -0.8} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} diff --git a/Assets/sunset_box/sunset_env_dynamic.shader b/Assets/sunset_box/sunset_env_dynamic.shader index 6db39e7..e97f758 100644 --- a/Assets/sunset_box/sunset_env_dynamic.shader +++ b/Assets/sunset_box/sunset_env_dynamic.shader @@ -167,7 +167,7 @@ return col; } - float3 frag(v2f i) : SV_Target + float4 frag(v2f i) : SV_Target { float3 sun_dir = float3(sin(_SunAngle), 0, cos(_SunAngle)); @@ -195,7 +195,7 @@ float3 col = sky(dir, theta, phi, sun_dir); col = lerp(col, _WaterCol, water_mod); - return col; + return float4(col, 1); } ENDCG }