- Unity 2018 Shaders and Effects Cookbook
- John P. Doran Alan Zucconi
- 271字
- 2021-06-18 19:04:13
How it works...
Unity has made the task of getting your shader environment up and running very easy for you. It is simply a matter of a few clicks and you are good to go. There are a lot of elements working in the background with regard to the Surface Shader itself. Unity has taken the Cg shader language and made it more efficient to write by doing a lot of the heavy Cg code lifting for you. The Surface Shader language is a more component-based way of writing shaders. Tasks such as processing your own texture coordinates and transformation matrices have already been done for you, so you don't have to start from scratch any more. In the past, we would have to start a new shader and rewrite a lot of code over and over again. As you gain more experience with Surface Shaders, you will naturally want to explore more of the underlying functions of the Cg language and how Unity is processing all of the low-level graphics processing unit (GPU) tasks for you.
All the files in a Unity project are referenced independently from the folder that they are in. We can move shaders and materials from within the editor without the risk of breaking any connection. Files, however, should never be moved from outside the editor as Unity will not be able to update their references.
So, by simply changing the shader's path name to a name of our choice, we have got our basic diffuse shader working in the Unity environment, with lights and shadows and all that, just by changing one line of code!
- Functional Python Programming
- MySQL數據庫管理與開發(慕課版)
- SQL基礎教程(視頻教學版)
- Getting Started with Gulp
- Visual FoxPro程序設計習題集及實驗指導(第四版)
- NetBeans IDE 8 Cookbook
- Spring MVC+MyBatis開發從入門到項目實踐(超值版)
- C語言程序設計與應用(第2版)
- 編程可以很簡單
- 后臺開發:核心技術與應用實踐
- Windows Phone 8 Game Development
- 跟戴銘學iOS編程:理順核心知識點
- Mastering HTML5 Forms
- After Effects CC案例設計與經典插件(視頻教學版)
- 深入理解Java虛擬機:JVM高級特性與最佳實踐