纳金网

标题: Unity的shader,帮助手册(一) [打印本页]

作者: 会飞的鱼    时间: 2011-12-19 17:18
标题: Unity的shader,帮助手册(一)
英文帮助手册中的一节,不知哪位老兄翻译的,转与此处与大家分享!
Unity Manual > Advanced > Shaders > Shaders: Getting started
This tutorial will teach you how you can create your own shaders and make you game look a lot better!

此教程将指引你如何建立自己的Shaders,让你的游戏场景看起来更好


Unity is equipped with a powerful shading and material language called ShaderLab. In style it is similar to CgFX and Direct3D Effects languages - it describes everything needed to display a Material, not just plain vertex/pixel shaders.

   Unity配备了强大的阴影和材料的语言工具称为ShaderLab,以程式语言来看,它类似于CgFX和Direct3D的语法,它不只纪录基本的端点或者映像点(vertex/pixel)资讯,也描述了材质所必要的一切资讯。
Shaders describe properties that are exposed in Unity's Material Inspector and multiple shader implementations (SubShaders) targeted at different graphics hardware capabilities, each describing complete graphics hardware rendering state, fixed function pipeline setup or vertex/fragment programs to use. Vertex and fragment programs are written in high-level Cg programming language or low-level shader assembly.

  在unity材质检视器中可以看到Shaders的性质及多重shader(SubShaders)的描述,针对不同图形硬件,每个描述也都完整的说明了图形硬件的彩现状态,fixed function pipeline如何设定、vertex/ fragment programs如何作用。 Vertex and fragment程序可以使用高阶Cg程式语言或低阶shader组合。
In this tutorial we describe how to write shaders in ShaderLab using both fixed function and programmable pipelines. We assume that the reader has a basic understanding of OpenGL or Direct3D render states, fixed function and programmable pipelines and has some knowledge of Cg, HLSL or GLSL programming languages. Some shader tutorials and documentation can be found on NVIDIA and AMD developer sites.

  在这个教程中,我们将描述如何使用fixed function与programmable pipelines两种方式于ShaderLab中撰写shaders,我们假设读者拥有基本的OpenGL或Direct3D彩现概念,并对cg有fixed function与programmable pipelines的常识,HLSL或GLSL编程语言技术,一些Shader教程与参考文件可于NVIDIA以及AMD的开发站上取得
Getting started

To create a new shader, either choose Assets->Create->Shader from the menubar, or duplicate an existing shader, and work from that. The new shader can be edited by double-clicking it in the Project View.

  建立一个新的shader有两种方法,可以由菜单Assets->Create->Shader新增,或复制一个既有的shader再进行编辑,新的shader可以透过双击来启动编辑画面(UniSciTE)
作者: C.R.CAN    时间: 2012-3-3 23:23
这么后现代

作者: 奇    时间: 2012-4-15 23:18
水……生命之源……灌……

作者: 晃晃    时间: 2012-5-8 23:21
呵呵,很漂亮啊

作者: C.R.CAN    时间: 2012-5-11 23:21
“再次路过……”我造一个-----特别路过

作者: tc    时间: 2012-7-7 23:24
楼主收集的可真全哦

作者: C.R.CAN    时间: 2012-7-15 23:18
好可爱的字,学习了

作者: tc    时间: 2012-7-29 23:19
很经典,很实用,学习了!

作者: 菜刀吻电线    时间: 2012-9-10 08:37
我看看就走,你们聊!

作者: osaka    时间: 2012-9-10 10:46
赞!!!!!!!!!!!!
作者: 菜刀吻电线    时间: 2012-10-18 23:28
真不错,全存下来了.





欢迎光临 纳金网 (http://course.narkii.com/club/) Powered by Discuz! X2.5