Cg shaders in unity and point sprites

So I am going through the tutorial for Cg on the nvidia site and it mentions the ability to create point sprites from vertices in HLSL and GLSL. I am curious if this is possible in Cg, along with changing the size of a vertex (which doesn’t seem to do anything).

One other thing, how can I deal with updated values being passed in to my shader? For example, if I have a value which I want to update with the time on every frame and then send into one of my shaders, does this have to be done in a script and then sent to the shader?

  1. Thats not possible, unity does not support point sprites
  2. If you simply want a time delta / animate over time then there is a constant for that. if you want something else you would have to pass it through a float that you expose and SetFloat on the material

Last I checked the size parameter was broken, and so on some devices, your point sprites are at max one pixel large.