From 4bf67212e151b62d958c0445b069e59f5cf03f92 Mon Sep 17 00:00:00 2001 From: "qsxft258@gmail.com" Date: Sun, 24 Aug 2025 19:21:17 +0900 Subject: [PATCH] =?UTF-8?q?Remove=20:=20=EB=B6=88=ED=95=84=EC=9A=94=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../websocket-sharp.csproj.meta | 7 - .../NiloToonEnvironmentReflectionDemo.shader | 179 ---------------- ...oToonEnvironmentReflectionDemo.shader.meta | 9 - .../Scripts/NiloToonPlanarReflectionBridge.cs | 202 ------------------ .../NiloToonPlanarReflectionBridge.cs.meta | 11 - .../NiloToon_PlanarReflection_사용법.md | 3 - .../NiloToon_PlanarReflection_사용법.md.meta | 7 - 7 files changed, 418 deletions(-) delete mode 100644 Assets/External/websocket-sharp/websocket-sharp.csproj.meta delete mode 100644 Assets/Scripts/NiloToonEnvironmentReflectionDemo.shader delete mode 100644 Assets/Scripts/NiloToonEnvironmentReflectionDemo.shader.meta delete mode 100644 Assets/Scripts/NiloToonPlanarReflectionBridge.cs delete mode 100644 Assets/Scripts/NiloToonPlanarReflectionBridge.cs.meta delete mode 100644 Assets/Scripts/NiloToon_PlanarReflection_사용법.md delete mode 100644 Assets/Scripts/NiloToon_PlanarReflection_사용법.md.meta diff --git a/Assets/External/websocket-sharp/websocket-sharp.csproj.meta b/Assets/External/websocket-sharp/websocket-sharp.csproj.meta deleted file mode 100644 index 66af5f92..00000000 --- a/Assets/External/websocket-sharp/websocket-sharp.csproj.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ae0a68acee725e141b02318f249f7990 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/NiloToonEnvironmentReflectionDemo.shader b/Assets/Scripts/NiloToonEnvironmentReflectionDemo.shader deleted file mode 100644 index 6ac9bfc1..00000000 --- a/Assets/Scripts/NiloToonEnvironmentReflectionDemo.shader +++ /dev/null @@ -1,179 +0,0 @@ -Shader "NiloToon/Environment/Reflection Demo" -{ - Properties - { - [Header(Base Properties)] - _BaseMap ("Base Map", 2D) = "white" {} - _BaseColor ("Base Color", Color) = (1, 1, 1, 1) - - [Header(Surface Properties)] - _Metallic ("Metallic", Range(0, 1)) = 0.5 - _Smoothness ("Smoothness", Range(0, 1)) = 0.5 - - [Header(Normal)] - _BumpMap ("Normal Map", 2D) = "bump" {} - _BumpScale ("Normal Scale", Float) = 1.0 - - [Header(Planar Reflection)] - [Toggle] _EnablePlanarReflection ("Enable Planar Reflection", Float) = 1 - _ReflectionIntensity ("Reflection Intensity", Range(0, 2)) = 1.0 - _ReflectionTintColor ("Reflection Tint", Color) = (1, 1, 1, 1) - _ReflectionFresnel ("Fresnel Power", Range(0.1, 5)) = 1.5 - _ReflectionDistortion ("Distortion", Range(0, 0.1)) = 0.02 - _ReflectionDepthFade ("Depth Fade", Range(0, 10)) = 1.0 - _ReflectionBlurRadius ("Blur Radius", Range(0, 2)) = 0.5 - - [Header(Advanced)] - _Cutoff ("Alpha Cutoff", Range(0, 1)) = 0.5 - - // Unity Standard Properties - _Surface ("Surface Type", Float) = 0.0 - } - - SubShader - { - Tags - { - "RenderType" = "Opaque" - "RenderPipeline" = "UniversalPipeline" - "Queue" = "Geometry" - } - - LOD 300 - - Pass - { - Name "ForwardLit" - Tags { "LightMode" = "UniversalForward" } - - HLSLPROGRAM - #pragma target 3.0 - - // Universal Pipeline keywords - #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN - #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS - #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS - #pragma multi_compile_fragment _ _SHADOWS_SOFT - #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION - #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING - #pragma multi_compile _ SHADOWS_SHADOWMASK - #pragma multi_compile _ DIRLIGHTMAP_COMBINED - #pragma multi_compile _ LIGHTMAP_ON - #pragma multi_compile _ DYNAMICLIGHTMAP_ON - #pragma multi_compile_fog - - // Material keywords - #pragma shader_feature_local _NORMALMAP - #pragma shader_feature_local _METALLICSPECGLOSSMAP - #pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - #pragma shader_feature_local _OCCLUSIONMAP - #pragma shader_feature_local _EMISSION - #pragma shader_feature_local _ALPHATEST_ON - #pragma shader_feature_local _ALPHAPREMULTIPLY_ON - #pragma shader_feature_local _RECEIVE_SHADOWS_OFF - - // Custom keywords for reflection - #pragma shader_feature_local _ENABLE_PLANAR_REFLECTION - #pragma shader_feature_local _REFLECTION_DEPTH_FADE - - // Instancing - #pragma multi_compile_instancing - #pragma multi_compile _ DOTS_INSTANCING_ON - - #pragma vertex LitPassVertex - #pragma fragment LitPassFragment - - // Include URP Lit shaders (NiloToon extension will be applied globally) - #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl" - #include "Packages/com.unity.render-pipelines.universal/Shaders/LitForwardPass.hlsl" - - ENDHLSL - } - - // Shadow Caster Pass - Pass - { - Name "ShadowCaster" - Tags { "LightMode" = "ShadowCaster" } - - ZWrite On - ZTest LEqual - ColorMask 0 - Cull[_Cull] - - HLSLPROGRAM - #pragma target 2.0 - - #pragma shader_feature_local_fragment _ALPHATEST_ON - #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - - #pragma multi_compile_instancing - #pragma multi_compile _ DOTS_INSTANCING_ON - - #pragma vertex ShadowPassVertex - #pragma fragment ShadowPassFragment - - #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl" - #include "Packages/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl" - ENDHLSL - } - - // Depth Only Pass - Pass - { - Name "DepthOnly" - Tags { "LightMode" = "DepthOnly" } - - ZWrite On - ColorMask 0 - Cull[_Cull] - - HLSLPROGRAM - #pragma target 2.0 - - #pragma shader_feature_local_fragment _ALPHATEST_ON - #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - - #pragma multi_compile_instancing - #pragma multi_compile _ DOTS_INSTANCING_ON - - #pragma vertex DepthOnlyVertex - #pragma fragment DepthOnlyFragment - - #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl" - #include "Packages/com.unity.render-pipelines.universal/Shaders/DepthOnlyPass.hlsl" - ENDHLSL - } - - // Meta Pass (for Lightmapping) - Pass - { - Name "Meta" - Tags { "LightMode" = "Meta" } - - Cull Off - - HLSLPROGRAM - #pragma target 2.0 - - #pragma shader_feature EDITOR_VISUALIZATION - #pragma shader_feature_local_fragment _SPECULAR_SETUP - #pragma shader_feature_local_fragment _EMISSION - #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP - #pragma shader_feature_local_fragment _ALPHATEST_ON - #pragma shader_feature_local_fragment _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A - #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED - - #pragma vertex UniversalVertexMeta - #pragma fragment UniversalFragmentMeta - - #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl" - #include "Packages/com.unity.render-pipelines.universal/Shaders/LitMetaPass.hlsl" - - ENDHLSL - } - } - - CustomEditor "UnityEditor.Rendering.Universal.ShaderGUI.LitShader" - Fallback "Hidden/Universal Render Pipeline/FallbackError" -} diff --git a/Assets/Scripts/NiloToonEnvironmentReflectionDemo.shader.meta b/Assets/Scripts/NiloToonEnvironmentReflectionDemo.shader.meta deleted file mode 100644 index e27f56c2..00000000 --- a/Assets/Scripts/NiloToonEnvironmentReflectionDemo.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 6b78a61e45607f744b59e4cfdd9d4b2a -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/NiloToonPlanarReflectionBridge.cs b/Assets/Scripts/NiloToonPlanarReflectionBridge.cs deleted file mode 100644 index edf6f714..00000000 --- a/Assets/Scripts/NiloToonPlanarReflectionBridge.cs +++ /dev/null @@ -1,202 +0,0 @@ -using UnityEngine; -using PlanarReflections5; - -/// -/// NiloToon Environment 셰이더와 PIDI Planar Reflections 5를 연동하는 브리지 스크립트 -/// -[System.Serializable] -public class NiloToonReflectionSettings -{ - [Header("Reflection Control")] - [Range(0f, 1f)] - public float reflectionIntensity = 1.0f; - - [ColorUsage(false)] - public Color reflectionTintColor = Color.white; - - [Range(0.1f, 5f)] - public float fresnelPower = 1.5f; - - [Range(0f, 0.1f)] - public float distortionStrength = 0.02f; - - [Range(0f, 10f)] - public float depthFade = 1.0f; - - [Range(0f, 2f)] - public float blurRadius = 0.5f; - - [Header("Advanced")] - public bool enableReflection = true; - public bool useDepthFade = false; - public LayerMask reflectionLayers = -1; -} - -[RequireComponent(typeof(PlanarReflectionRenderer))] -public class NiloToonPlanarReflectionBridge : MonoBehaviour -{ - [Header("NiloToon Integration Settings")] - public NiloToonReflectionSettings reflectionSettings = new NiloToonReflectionSettings(); - - [Header("Shader Keywords")] - [SerializeField] private bool enableReflectionDepthFade = false; - - private PlanarReflectionRenderer planarRenderer; - private Camera[] monitoredCameras; - - // 셰이더 프로퍼티 IDs (성능 최적화) - private static readonly int EnablePlanarReflectionID = Shader.PropertyToID("_EnablePlanarReflection"); - private static readonly int ReflectionIntensityID = Shader.PropertyToID("_ReflectionIntensity"); - private static readonly int ReflectionTintColorID = Shader.PropertyToID("_ReflectionTintColor"); - private static readonly int ReflectionFresnelID = Shader.PropertyToID("_ReflectionFresnel"); - private static readonly int ReflectionDistortionID = Shader.PropertyToID("_ReflectionDistortion"); - private static readonly int ReflectionDepthFadeID = Shader.PropertyToID("_ReflectionDepthFade"); - private static readonly int ReflectionBlurRadiusID = Shader.PropertyToID("_ReflectionBlurRadius"); - - private void Awake() - { - planarRenderer = GetComponent(); - if (planarRenderer == null) - { - Debug.LogError("NiloToonPlanarReflectionBridge requires PlanarReflectionRenderer component!"); - enabled = false; - return; - } - } - - private void Start() - { - // 초기 설정 적용 - UpdateShaderProperties(); - UpdateShaderKeywords(); - } - - private void Update() - { - // 실시간으로 셰이더 프로퍼티 업데이트 - UpdateShaderProperties(); - - // 카메라 변경 감지 및 업데이트 - if (monitoredCameras == null || monitoredCameras.Length != Camera.allCamerasCount) - { - UpdateCameraReferences(); - } - } - - private void UpdateShaderProperties() - { - // Global 셰이더 프로퍼티 업데이트 - Shader.SetGlobalFloat(EnablePlanarReflectionID, reflectionSettings.enableReflection ? 1.0f : 0.0f); - Shader.SetGlobalFloat(ReflectionIntensityID, reflectionSettings.reflectionIntensity); - Shader.SetGlobalVector(ReflectionTintColorID, new Vector4( - reflectionSettings.reflectionTintColor.r, - reflectionSettings.reflectionTintColor.g, - reflectionSettings.reflectionTintColor.b, - reflectionSettings.reflectionTintColor.a)); - Shader.SetGlobalFloat(ReflectionFresnelID, reflectionSettings.fresnelPower); - Shader.SetGlobalFloat(ReflectionDistortionID, reflectionSettings.distortionStrength); - Shader.SetGlobalFloat(ReflectionDepthFadeID, reflectionSettings.depthFade); - Shader.SetGlobalFloat(ReflectionBlurRadiusID, reflectionSettings.blurRadius); - } - - private void UpdateShaderKeywords() - { - // 셰이더 키워드 업데이트 - if (enableReflectionDepthFade && reflectionSettings.useDepthFade) - { - Shader.EnableKeyword("_REFLECTION_DEPTH_FADE"); - } - else - { - Shader.DisableKeyword("_REFLECTION_DEPTH_FADE"); - } - } - - private void UpdateCameraReferences() - { - monitoredCameras = new Camera[Camera.allCamerasCount]; - Camera.GetAllCameras(monitoredCameras); - - // Planar Reflection 설정을 카메라별로 동기화 - if (planarRenderer != null && planarRenderer.Settings != null) - { - planarRenderer.Settings.reflectLayers = reflectionSettings.reflectionLayers; - planarRenderer.Settings.renderDepth = reflectionSettings.useDepthFade; - } - } - - /// - /// 특정 재질에 반사 설정을 적용합니다. - /// - /// 적용할 재질 - public void ApplyToMaterial(Material material) - { - if (material == null) return; - - material.SetFloat(EnablePlanarReflectionID, reflectionSettings.enableReflection ? 1.0f : 0.0f); - material.SetFloat(ReflectionIntensityID, reflectionSettings.reflectionIntensity); - material.SetVector(ReflectionTintColorID, new Vector4( - reflectionSettings.reflectionTintColor.r, - reflectionSettings.reflectionTintColor.g, - reflectionSettings.reflectionTintColor.b, - reflectionSettings.reflectionTintColor.a)); - material.SetFloat(ReflectionFresnelID, reflectionSettings.fresnelPower); - material.SetFloat(ReflectionDistortionID, reflectionSettings.distortionStrength); - material.SetFloat(ReflectionDepthFadeID, reflectionSettings.depthFade); - material.SetFloat(ReflectionBlurRadiusID, reflectionSettings.blurRadius); - - // 키워드 설정 - if (enableReflectionDepthFade && reflectionSettings.useDepthFade) - { - material.EnableKeyword("_REFLECTION_DEPTH_FADE"); - } - else - { - material.DisableKeyword("_REFLECTION_DEPTH_FADE"); - } - } - - /// - /// 씬의 모든 NiloToon Environment 재질에 설정을 적용합니다. - /// - public void ApplyToAllNiloToonMaterials() - { - Renderer[] renderers = FindObjectsOfType(); - foreach (Renderer renderer in renderers) - { - foreach (Material mat in renderer.materials) - { - // NiloToon Environment 셰이더인지 확인 (이름으로 판별) - if (mat.shader.name.Contains("NiloToon") && mat.shader.name.Contains("Environment")) - { - ApplyToMaterial(mat); - } - } - } - } - - private void OnValidate() - { - // Inspector에서 값이 변경될 때 실시간 업데이트 - if (Application.isPlaying) - { - UpdateShaderProperties(); - UpdateShaderKeywords(); - } - } - - #if UNITY_EDITOR - [UnityEditor.MenuItem("Tools/NiloToon/Create Planar Reflection Bridge")] - private static void CreateBridge() - { - GameObject bridge = new GameObject("NiloToon Planar Reflection Bridge"); - bridge.AddComponent(); - bridge.AddComponent(); - - UnityEditor.Selection.activeGameObject = bridge; - UnityEditor.EditorGUIUtility.PingObject(bridge); - - Debug.Log("NiloToon Planar Reflection Bridge가 생성되었습니다!"); - } - #endif -} diff --git a/Assets/Scripts/NiloToonPlanarReflectionBridge.cs.meta b/Assets/Scripts/NiloToonPlanarReflectionBridge.cs.meta deleted file mode 100644 index 7d7a5397..00000000 --- a/Assets/Scripts/NiloToonPlanarReflectionBridge.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7e4f8a9b2c3d5e6f7a8b9c0d1e2f3a4b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/NiloToon_PlanarReflection_사용법.md b/Assets/Scripts/NiloToon_PlanarReflection_사용법.md deleted file mode 100644 index c82dd89a..00000000 --- a/Assets/Scripts/NiloToon_PlanarReflection_사용법.md +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9cb031d244b656ee4410f8c88ecdf310ae83089f27885b5255aab396454d7235 -size 6172 diff --git a/Assets/Scripts/NiloToon_PlanarReflection_사용법.md.meta b/Assets/Scripts/NiloToon_PlanarReflection_사용법.md.meta deleted file mode 100644 index 1d6867cd..00000000 --- a/Assets/Scripts/NiloToon_PlanarReflection_사용법.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: a61c34d59640f5140b3974d1f4968189 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: