Small but useful Unity3D shader for Augmented Reality

Sometimes when you do Augmented reality apps, you need hide parts of 3D which pass behind user body or head. Easiest way to make this – use hidden 3d mannequin or 3d head with special shader which cull all pixel data behind it.


I just wrote small one for Unity3D.

Shader "Custom/CullMaterial" {
	Properties {
		_MainTex ("Base (RGB)", 2D) = "white" {}
	 SubShader {
	 Tags { "Queue" = "Background-1" }
        Pass {
            Material {
                Diffuse (1,1,1,1)
            Lighting On
            ColorMask 0
	FallBack "Diffuse"