56 lines
2.1 KiB
Plaintext
56 lines
2.1 KiB
Plaintext
Shader "Scanner/WorldScanning/Transparency" {
|
|
Properties {
|
|
_LightSweepVector ("Light Sweep Vector", Vector) = (0, 0, 1, 0)
|
|
_LightSweepAmp ("Light Sweep Amp", Float) = 1
|
|
_LightSweepExp ("Light Sweep Exp", Float) = 10
|
|
_LightSweepInterval ("Light Sweep Interval", Float) = 20
|
|
_LightSweepSpeed ("Light Sweep Speed", Float) = 10
|
|
_LightSweepColor ("Light Sweep Color", Color) = (1, 0, 0, 0)
|
|
_LightSweepAddColor ("Light Sweep Add Color", Color) = (0, 0, 0, 0)
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _BlendSrc ("Blend Source", Int) = 5
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _BlendDst ("Blend Destination", Int) = 10
|
|
}
|
|
SubShader {
|
|
Tags { "RenderPipeline" = "UniversalRenderPipeline" "IgnoreProjector" = "True" "RenderType" = "Transparent" "Queue" = "Transparent" }
|
|
ZWrite Off
|
|
Blend [_BlendSrc] [_BlendDst]
|
|
|
|
HLSLINCLUDE
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
ENDHLSL
|
|
|
|
Pass {
|
|
Tags { "LightMode" = "UniversalForward" }
|
|
|
|
HLSLPROGRAM
|
|
#pragma vertex SurfaceVertex
|
|
#pragma fragment SurfaceFragment
|
|
#include "Utils.cginc"
|
|
|
|
// -------------------------------------
|
|
// Universal Render Pipeline keywords
|
|
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
|
|
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE
|
|
#pragma multi_compile _ _SHADOWS_SOFT
|
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile ALS_DIRECTIONAL ALS_SPHERICAL
|
|
|
|
void SurfaceFunction (Varyings IN, out CustomSurfaceData surfaceData)
|
|
{
|
|
surfaceData = (CustomSurfaceData)0;
|
|
surfaceData.positionWS = IN.positionWS;
|
|
}
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
half4 LightingFunction (CustomSurfaceData surfaceData, LightingData lightingData)
|
|
{
|
|
return LightSweepColor(float4(surfaceData.positionWS, 1.0));
|
|
}
|
|
ENDHLSL
|
|
}
|
|
UsePass "Universal Render Pipeline/Lit/ShadowCaster"
|
|
UsePass "Universal Render Pipeline/Lit/DepthOnly"
|
|
UsePass "Universal Render Pipeline/Lit/Meta"
|
|
}
|
|
FallBack Off
|
|
} |