Last active
August 24, 2017 10:50
-
-
Save GOROman/2cd61ae9eab52cadbae6 to your computer and use it in GitHub Desktop.
かまいたちの夜シェーダー
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/Kamaitachi" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
} | |
SubShader { | |
Tags { "Queue" = "Transparent" } | |
Stencil { | |
Ref 1 | |
Comp always | |
Pass replace | |
} | |
ColorMask 0 | |
// ZWrite Off | |
// Cull Off | |
CGPROGRAM | |
#pragma surface surf Lambert | |
sampler2D _MainTex; | |
struct Input { | |
float2 uv_MainTex; | |
}; | |
void surf (Input IN, inout SurfaceOutput o) { | |
o.Alpha = 0; | |
} | |
ENDCG | |
} | |
FallBack "Diffuse" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/Mask" { | |
Properties { | |
_Color ("Main Color", Color) = (0,0,1,0.5) | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
} | |
SubShader { | |
Tags { "Queue" = "Transparent" } | |
Stencil { | |
Ref 1 | |
Comp equal | |
} | |
Pass { | |
Blend SrcAlpha OneMinusSrcAlpha | |
Color [_Color] | |
Lighting Off | |
// SetTexture [_MainTex] { | |
// combine texture * primary double, texture * primary | |
// } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment