Screen space shader on IPhone

Is there a way to use screenspace vertex positions in a mesh? I’d like to simply set the positions of vertices in a mesh to screenspace values and use a shader that doesn’t do local to view space transforms but uses those values as is. Currently I’m transforming the world space positions in the mesh when the camera moves so that the mesh remains fixed relative to the camera but I’d like to remove this extra cost.

Any ideas?

I’m not sure if I understand your question correctly, could you paste your code? It sounds like you’re doing mesh vertex modification on CPU, am I right?

Ideally you would write a CG or GLSL shader which transforms mesh vertices into the screenspace regardless of the camera position. In case of GLSL something like:
gl_Position = gl_ProjectionMatrix * gl_Vertex;

Yep, that’s what I meant. I’m just doing vertex modification on CPU like SpriteManager does.

Would that CG code work on all IPhone generations?

A cheap solution I use for something tracking the camera, and remaining in the same screen space is to just parent it to the Camera. Then the transform matrices do all the work for you.

Yeah, I need to handle zooming as well though. Computing the values on the CPU works currently but I was just wondering how I could do it using the OpenGL fixed function pipeline in Unity.

The proper method for OpenGL is mentioned here:
http://www.opengl.org/resources/faq/technical/transformations.htm
at 9.030.

However I’m really not sure what Unity would allow with regards to writing directly with OpenGL.