Files
Northbound/Assets/External/JMO Assets/Cartoon FX Remaster/CFXR Assets/Shaders/CFXR Particle Distortion.cfxrshader
dal4segno f3923079a4 건설 모드에서 클릭이 잘 작동하지 않는 문제 수정
건설 모드 UI가 클릭되어 건설되지 않는 문제 수정
JMO Asset 위치 조정
Tower, Monster, Creep의 Hit/Destroy FX Prefab 설정 (Template Level)
Tower에 체력바 추가 (최초 건설 시, 체력 변경 시 등장)
Tower 관련 디버깅 로그 정리
건설 토대의 사이즈가 비정상적인 문제 수정
2026-02-25 01:41:58 +09:00

182 lines
4.8 KiB
Plaintext

//--------------------------------------------------------------------------------------------------------------------------------
// Cartoon FX
// (c) 2012-2020 Jean Moreno
//--------------------------------------------------------------------------------------------------------------------------------
Shader "Cartoon FX/Remaster/Particle Screen Distortion"
{
Properties
{
[Toggle(_ALPHATEST_ON)] _UseAlphaClip ("Alpha Clipping (Cutout)", Float) = 0
//# IF_KEYWORD _ALPHATEST_ON
_Cutoff ("Cutoff Threshold", Range(0.001,1)) = 0.1
//# END_IF
//# --------------------------------------------------------
[Toggle(_FADING_ON)] _UseSP ("Soft Particles", Float) = 0
//# IF_KEYWORD _FADING_ON
_SoftParticlesFadeDistanceNear ("Near Fade", Float) = 0
_SoftParticlesFadeDistanceFar ("Far Fade", Float) = 1
//# END_IF
//#
[Toggle(_CFXR_EDGE_FADING)] _UseEF ("Edge Fade", Float) = 0
//# IF_KEYWORD _CFXR_EDGE_FADING
_EdgeFadePow ("Edge Fade Power", Float) = 1
//# END_IF
//# ========================================================
//# Texture
//#
[NoScaleOffset] _ScreenDistortionTex ("Distortion Texture", 2D) = "bump" {}
_ScreenDistortionScale ("Distortion Scale", Range(-0.5, 0.5)) = 0.1
//# ========================================================
//# Debug
//#
[Toggle(_DEBUG_VISUALIZE_DISTORTION)] _DebugVisualize ("Visualize Distortion Particles", Float) = 0
}
Category
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
"PreviewType"="Plane"
}
Blend SrcAlpha OneMinusSrcAlpha, One One
ZWrite Off
Cull Off
/*** URP ***/
//====================================================================================================================================
// Universal Rendering Pipeline
Subshader
{
Pass
{
Name "BASE_URP"
Tags { "LightMode"="UniversalForward" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
#pragma shader_feature_local _ _DEBUG_VISUALIZE_DISTORTION
#define CFXR_URP
#define CFXR_SCREEN_DISTORTION_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
// Same as above with 'Universal2D' instead and DISABLE_SOFT_PARTICLES keyword
Pass
{
Name "BASE_URP"
Tags { "LightMode"="Universal2D" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
#pragma target 2.0
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:ParticleInstancingSetup
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
#pragma shader_feature_local _ _DEBUG_VISUALIZE_DISTORTION
#define _CameraOpaqueTexture _CameraSortingLayerTexture
#define CFXR_URP
#define DISABLE_SOFT_PARTICLES
#define CFXR_SCREEN_DISTORTION_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
/*** END URP ***/
/*** BIRP ***/
//====================================================================================================================================
// Built-in Rendering Pipeline
SubShader
{
GrabPass
{
Tags { "LightMode" = "Always" }
"_GrabTexture"
}
Pass
{
Name "BASE"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vertex_program
#pragma fragment fragment_program
//vertInstancingSetup writes to global, not allowed with DXC
// #pragma never_use_dxc
// #pragma target 2.5
// #pragma multi_compile_instancing
// #pragma instancing_options procedural:vertInstancingSetup
#pragma multi_compile_particles
#pragma multi_compile_fog
//#pragma multi_compile_fwdbase
//#pragma multi_compile SHADOWS_SCREEN
// Using the same keywords as Unity's Standard Particle shader to minimize project-wide keyword usage
#pragma shader_feature_local _ _FADING_ON
#pragma shader_feature_local_fragment _ _ALPHATEST_ON
#pragma shader_feature_local _ _DEBUG_VISUALIZE_DISTORTION
#include "UnityStandardParticleInstancing.cginc"
#define CFXR_SCREEN_DISTORTION_SHADER
#include "CFXR_PASSES.cginc"
ENDCG
}
}
/*** END BIRP ***/
}
CustomEditor "CartoonFX.MaterialInspector"
}