Quantcast
Channel: Questions in topic: "hlsl"
Viewing all articles
Browse latest Browse all 206

Shader with "alpha" parameter no longer writes to Z-Buffer

$
0
0
I'm working on a set of custom shaders to override Unity's built-in terrain shaders. When I add the "alpha" parameter: #pragma surface surf Lambert alpha ...suddenly distant terrain trees start drawing on top of nearby terrain hills — it looks as though the terrain shader is no longer writing to the Z-Buffer. I have `ZWrite On` set for my terrain `Lightmap-FirstPass` shader, and `ZTest Less` set for my `BillboardTree` shader. Any ideas about how I can fix this? ![alt text][1] [1]: http://answers.unity3d.com/storage/temp/985-Screen+shot+2012-05-22+at+9.19.18+PM.png

Viewing all articles
Browse latest Browse all 206

Trending Articles