Cg Programming/Surface Shaders

< Cg Programming


Unity's Surface Shaders provide a simplified way of programming Cg shaders by automatically adding shader code for lighting and shadow computations such that programmers only need to specify material constants.

An introduction to Surface Shader scripting with several video tutorials is available at Unity Cookie.

If you already know Cg, the shader examples in Unity's documentation and the source code of built-in surface shaders are very useful to understand Surface Shaders.


< Cg Programming

Unless stated otherwise, all example source code on this page is granted to the public domain.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.