Created
October 9, 2018 11:43
-
-
Save nabesi777/9ed8cbaf57ba1276d9380a586087c21c 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/HideObject1" { | |
SubShader{ | |
Tags { "RenderType" = "Opaque" "Queue" = "Geometry-1"} | |
Pass{ | |
ColorMask 0 //描写しない | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
//頂点座標をそのまま返す | |
float4 vert(float4 v:POSITION) :SV_POSITION{ | |
return UnityObjectToClipPos(v); | |
} | |
//最小限の色だけを返す | |
fixed4 frag() :COLOR{ | |
return fixed4(0,0,0,0); | |
} | |
ENDCG | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment