How To: Hi Poly Object with a low Poly Shadow

Hi,

i need a shader that only cast a shadow. I found some keywords, but didn’t find any documentation.

This is what i found, to only display the shadow of an object.

Shader "TreeShader"
{
   SubShader
   {   
      UsePass "VertexLit/SHADOWCASTER"
   }
}

But this is not working on transparent textures like trees.

Also i found some thing about ShadowCaster - but how it works?

Perhaps try “Transparent/Cutout/VertexLit/Caster”. You’ll need to provide a _Cutoff property so the pass can use it.

i tryed it, but i doesnt work.

Unity Editor says: “Shader ‘TreeShader’: no subshader can run on this graphics card”

This is my shader:

Shader "TreeShader"
{
	Properties {
		_Color ("Main Color", Color) = (1,1,1,1)
		_Cutoff ("Base Alpha cutoff", Range (0,.9)) = .9    
		_MainTex ("Base (RGB)", 2D) = "white" {}
	}
	
   SubShader
   {   
      UsePass "Transparent/Cutout/VertexLit/Caster"
   }
}

I ran into the same problem once, and I fixed it by copying the entire pass to the shader instead of using UsePass. I have no idea why that would work, but it did.

Thanks, this make sense. But where i can find the original shaders in unity3d? I can’t find the shaders in the directory’s.

Look at the stickies for the forum that this topic is in.

–Eric