mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-16 14:11:19 +07:00
50 lines
1.2 KiB
GLSL
50 lines
1.2 KiB
GLSL
Shader "FlashTools/SwfMasked" {
|
|
Properties {
|
|
[PerRendererData] _MainTex ("Main Texture" , 2D ) = "white" {}
|
|
[PerRendererData] _AlphaTex ("Alpha Texture" , 2D ) = "white" {}
|
|
[PerRendererData] _ExternalAlpha ("External Alpha", Float) = 0
|
|
[PerRendererData] _Tint ("Tint" , Color) = (1,1,1,1)
|
|
|
|
_StencilID ("Stencil ID", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendOp )] _BlendOp ("BlendOp" , Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("SrcBlend", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("DstBlend", Int) = 10
|
|
}
|
|
|
|
SubShader {
|
|
Tags {
|
|
"Queue" = "Transparent"
|
|
"IgnoreProjector" = "True"
|
|
"RenderType" = "Transparent"
|
|
"PreviewType" = "Plane"
|
|
"CanUseSpriteAtlas" = "True"
|
|
}
|
|
|
|
Cull Off
|
|
Lighting Off
|
|
ZWrite Off
|
|
|
|
BlendOp [_BlendOp]
|
|
Blend [_SrcBlend] [_DstBlend]
|
|
|
|
Pass {
|
|
Stencil {
|
|
Ref [_StencilID]
|
|
Comp Equal
|
|
}
|
|
CGPROGRAM
|
|
fixed4 _Tint;
|
|
sampler2D _MainTex;
|
|
sampler2D _AlphaTex;
|
|
sampler2D _GrabTexture;
|
|
float _ExternalAlpha;
|
|
|
|
#include "UnityCG.cginc"
|
|
#include "SwfBaseCG.cginc"
|
|
|
|
#pragma vertex swf_vert
|
|
#pragma fragment swf_frag
|
|
ENDCG
|
|
}
|
|
}
|
|
} |