I am using a vertex shader, that relies on the position of the Camera.. I am unable to get the camera used in Scene Editor.. is there a way to get teh camera position in the Shader Lib, without setting it as a variable? ( like a pre-defined one, that includes the scene editor camera );
Otherwise I'd like to know how I can grab the Camera GameObject from the Scene Editor
Have you checked the Vertex shaders that are included with Unity? Their source code can be downloaded here:
Perhaps you could review the source of the built-in Vertex shader to see how they overcome this problem?
answered Jun 15 '10 at 02:00 AM