Hello,
Is there anybody who can help me with some code which rotetes polygon to be faced egzacly to camera? (bilboard efect for vegecations)
Thax
ps. I’m working on pack of shaders which avoids errors I get while rendering objects with build-in shaders.
most of basic shaders are ready now.
(I attach sample of errors I’m saying about)
Best spelling of “exactly” I’ve ever seen 
Check out this script from the Wiki for billboarding:
http://www.unifycommunity.com/wiki/index.php?title=LookAtCameraYonly
The errors you’re seeing have to do with double lighting of pixel shaders when geometry slightly intersects. This will be fixed in 2.6.
when 2.6 is will be reelased?
for tempoprary usage my shaders are solves that problem (or at last makes it small enough to be not seen without very good checking) when I finish package it should be avaliable for all users.
and about script… I’m looking for a way to do it in shader, its not good I think to deal with it on cpu.
How can i get camera position in the world in CG ?(it should be enough for me)
Looking at UnityCG.cginc, you should be able to calculate camera world position using “uniform float3 _ObjectSpaceCameraPos;” and “uniform float4x4 _Object2World”.
yes, I did it… but it looks like i dont know how to move vertex in world… -.-
I did it in last week, but i forgot and can’t find proper way. Is there anybody who have sample cg vertex which moves vertex to anoher position ?
Thanx