Shader "Amazing Assets/Curved World/Particles/Unlit" { Properties { [CurvedWorldBendSettings] _CurvedWorldBendSettings("0|1", Vector) = (0, 0, 0, 0) _BaseMap("Base Map", 2D) = "white" {} _BaseColor("Base Color", Color) = (1,1,1,1) _Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 _BumpMap("Normal Map", 2D) = "bump" {} _EmissionColor("Color", Color) = (0,0,0) _EmissionMap("Emission", 2D) = "white" {} // ------------------------------------- // Particle specific _SoftParticlesNearFadeDistance("Soft Particles Near Fade", Float) = 0.0 _SoftParticlesFarFadeDistance("Soft Particles Far Fade", Float) = 1.0 _CameraNearFadeDistance("Camera Near Fade", Float) = 1.0 _CameraFarFadeDistance("Camera Far Fade", Float) = 2.0 _DistortionBlend("Distortion Blend", Float) = 0.5 _DistortionStrength("Distortion Strength", Float) = 1.0 // ------------------------------------- // Hidden properties - Generic [HideInInspector] _Surface("__surface", Float) = 0.0 [HideInInspector] _Blend("__mode", Float) = 0.0 [HideInInspector] _AlphaClip("__clip", Float) = 0.0 [HideInInspector] _BlendOp("__blendop", Float) = 0.0 [HideInInspector] _SrcBlend("__src", Float) = 1.0 [HideInInspector] _DstBlend("__dst", Float) = 0.0 [HideInInspector] _ZWrite("__zw", Float) = 1.0 [HideInInspector] _Cull("__cull", Float) = 2.0 // Particle specific [HideInInspector] _ColorMode("_ColorMode", Float) = 0.0 [HideInInspector] _BaseColorAddSubDiff("_ColorMode", Vector) = (0,0,0,0) [ToggleOff] _FlipbookBlending("__flipbookblending", Float) = 0.0 [HideInInspector] _SoftParticlesEnabled("__softparticlesenabled", Float) = 0.0 [HideInInspector] _CameraFadingEnabled("__camerafadingenabled", Float) = 0.0 [HideInInspector] _SoftParticleFadeParams("__softparticlefadeparams", Vector) = (0,0,0,0) [HideInInspector] _CameraFadeParams("__camerafadeparams", Vector) = (0,0,0,0) [HideInInspector] _DistortionEnabled("__distortionenabled", Float) = 0.0 [HideInInspector] _DistortionStrengthScaled("Distortion Strength Scaled", Float) = 0.1 // Editmode props [HideInInspector] _QueueOffset("Queue offset", Float) = 0.0 // ObsoleteProperties [HideInInspector] _FlipbookMode("flipbook", Float) = 0 [HideInInspector] _Mode("mode", Float) = 0 [HideInInspector] _Color("color", Color) = (1,1,1,1) } SubShader { Tags{"RenderType" = "Opaque" "IgnoreProjector" = "True" "PreviewType" = "Plane" "PerformanceChecks" = "False" "RenderPipeline" = "UniversalPipeline"} // ------------------------------------------------------------------ // Forward pass. Pass { // Lightmode matches the ShaderPassName set in UniversalRenderPipeline.cs. SRPDefaultUnlit and passes with // no LightMode tag are also rendered by Universal Render Pipeline Name "ForwardLit" BlendOp[_BlendOp] Blend[_SrcBlend][_DstBlend] ZWrite[_ZWrite] Cull[_Cull] ColorMask RGB HLSLPROGRAM // Required to compile gles 2.0 with standard SRP library // All shaders must be compiled with HLSLcc and currently only gles is not using HLSLcc by default #pragma prefer_hlslcc gles #pragma exclude_renderers d3d11_9x #pragma target 2.0 // ------------------------------------- // Material Keywords #pragma shader_feature _NORMALMAP #pragma shader_feature _EMISSION // ------------------------------------- // Particle Keywords #pragma shader_feature _ _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON #pragma shader_feature _ALPHATEST_ON #pragma shader_feature _ _COLOROVERLAY_ON _COLORCOLOR_ON _COLORADDSUBDIFF_ON #pragma shader_feature _FLIPBOOKBLENDING_ON #pragma shader_feature _SOFTPARTICLES_ON #pragma shader_feature _FADING_ON #pragma shader_feature _DISTORTION_ON // ------------------------------------- // Unity defined keywords #pragma multi_compile_fog #pragma vertex vertParticleUnlit #pragma fragment fragParticleUnlit #include "Packages/com.unity.render-pipelines.universal/Shaders/Particles/ParticlesUnlitInput.hlsl" #define CURVEDWORLD_BEND_TYPE_CLASSICRUNNER_X_POSITIVE #define CURVEDWORLD_BEND_ID_1 #pragma shader_feature_local CURVEDWORLD_DISABLED_ON // #pragma shader_feature_local CURVEDWORLD_NORMAL_TRANSFORMATION_ON //Unilit shader does not need Normal transformation #include "../../Core/CurvedWorldTransform.cginc" #include "ParticlesUnlitForwardPass.hlsl" ENDHLSL } //PassName "ScenePickingPass" Pass { Name "ScenePickingPass" Tags { "LightMode" = "Picking" } BlendOp Add Blend One Zero ZWrite On Cull Off CGPROGRAM #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" #include "UnityShaderUtilities.cginc" #pragma target 3.0 #pragma shader_feature _ALPHATEST_ON #pragma shader_feature _ALPHAPREMULTIPLY_ON #pragma multi_compile_instancing #pragma vertex vertEditorPass #pragma fragment fragScenePickingPass #define CURVEDWORLD_BEND_TYPE_CLASSICRUNNER_X_POSITIVE #define CURVEDWORLD_BEND_ID_1 #pragma shader_feature_local CURVEDWORLD_DISABLED_ON #include "../../Core/SceneSelection.cginc" ENDCG } //Pass "ScenePickingPass" //PassName "SceneSelectionPass" Pass { Name "SceneSelectionPass" Tags { "LightMode" = "SceneSelectionPass" } BlendOp Add Blend One Zero ZWrite On Cull Off CGPROGRAM #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" #include "UnityShaderUtilities.cginc" #pragma target 3.0 #pragma shader_feature _ALPHATEST_ON #pragma shader_feature _ALPHAPREMULTIPLY_ON #pragma multi_compile_instancing #pragma vertex vertEditorPass #pragma fragment fragSceneHighlightPass #define CURVEDWORLD_BEND_TYPE_CLASSICRUNNER_X_POSITIVE #define CURVEDWORLD_BEND_ID_1 #pragma shader_feature_local CURVEDWORLD_DISABLED_ON #include "../../Core/SceneSelection.cginc" ENDCG } //Pass "SceneSelectionPass" } CustomEditor "UnityEditor.Rendering.Universal.ShaderGUI.CurvedWorld_ParticlesUnlitShader" }