Converting the XRAY Shader to 2.0

I am trying to convert the shader to Unity 2.0, i get weird errors like “Cg: error C0501: type name expected at token “return” at line 15” but the return clause seems to be correct… help …

51193–1874–$xray_187.shader (784 Bytes)

Aargh, it’s Cg getting confused with Mac-style line endings… Just converting your file from Mac (CR) endings to Unix (LF) or Windows (CRLF) line endings fixes the error.

I updated XRay shader on the wiki for Unity 2.0 as well.