Skip to content

Instantly share code, notes, and snippets.

@lyuma
Created January 7, 2019 01:24
Show Gist options
  • Save lyuma/826f8da875f4a2a14d87cc7829e836c5 to your computer and use it in GitHub Desktop.
Save lyuma/826f8da875f4a2a14d87cc7829e836c5 to your computer and use it in GitHub Desktop.
Shader "LyumaShader/InsideSphere"
{
Properties
{
// Shader properties
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader
{
// Shader code
Pass{
Cull Back
Stencil {
Ref 123
Comp Always
Pass Replace
ZFail Replace
Fail Replace
}
ColorMask 0
ZWrite Off
}
Pass{
Tags{
"Queue" = "Transparent"
}
Stencil {
Ref 123
Comp NotEqual
Pass Keep
}
Cull Front
Lighting Off
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment