Unity3D Shader官方教程翻譯(一)
Shader Reference
著色參考
Shaders in Unity can be written in one of three different ways:
Unity3D著色器,可以寫在三種不同的方式之一:
assurface shaders,
asvertex and fragment shaders and
asfixed function shaders.
表面著色,
頂點和片段著色器和
作為固定功能著色
Theshader tutorial can guide you on choosing the right type for your needs.
著色教程可以指導您對您的需求選擇正確的型別
Regardless of which type you choose, the actual meat of the shader code will always be wrapped in a language called ShaderLab, which is used to organize the shader structure. It looks like this:
無論您選擇哪種型別,實際的shader程式碼肉總是會被裹在被稱為ShaderLab一種語言,這是用來組織結構著色。它看起來像這樣:
Shader "MyShader" {
Properties { _MyTexture ("My Texture", 2D) = "white" { }
// other properties like colors or vectors go here as well //其他屬性如顏色或向量 }
SubShader {
// here goes the 'meat' of your
// - surface shader or
// - vertex and program shader or
// - fixed function shader
/ /這裡寫內容
/ / - 表面著色 或
/ / - 頂點和程式著色 或
/ / - 固定功能著色
}
SubShader {
// here goes a simpler version of the SubShader above than can run on older graphics cards
/ /可以執行在舊的顯示卡的著色器
}
}
We recommend that you start by reading about some basic concepts of the ShaderLab syntax in the sections listed below and then to move on to read about surface shaders or vertex and fragment shaders in other sections. Since fixed function shaders are written using ShaderLab only, you will find more information about them in the ShaderLab reference itself.
我們建議您閱讀ShaderLab在下面列出,然後轉移到其他章節中有關表面著色或頂點和片段著色器讀取的部分語法的一些基本概念開始。由於固定功能著色器編寫只能使用ShaderLab,你會發現更多的關於他們的資訊在ShaderLab引用本身。
The reference below includes plenty of examples for the different types of shaders. For even more examples of surface shaders in particular, you can get the source of Unity's built-in shaders from theResources section. Unity'sImage Effects package contains a lot of interesting vertex and fragment shaders.
下面的參考,包括大量的著色不同型別的例子。更多的在粒子系統中使用的表面著色的例子,你可以查閱Unity3D內建的Shader獲得更多資訊。Unity3D的影像效果包中包含了很多有趣的頂點和片段著色器。
Read on for shader reference, and check out theshader tutorial as well!
ShaderLab syntax: Shader
ShaderLab syntax: Properties
ShaderLab syntax: SubShader
ShaderLab syntax: Pass
ShaderLab syntax: Color, Material, Lighting
ShaderLab syntax: Culling & Depth Testing
ShaderLab syntax: Texturing
ShaderLab syntax: Fog
ShaderLab syntax: Alpha testing
ShaderLab syntax: Blending
ShaderLab syntax: Pass Tags
ShaderLab syntax: Name
ShaderLab syntax: BindChannels
ShaderLab syntax: UsePass
ShaderLab syntax: GrabPass
ShaderLab syntax: SubShader Tags
ShaderLab syntax: Fallback
ShaderLab syntax: other commands
Writing Surface Shaders
Surface Shader Examples
Custom Lighting models in Surface Shaders
Surface Shader Lighting Examples
Writing vertex and fragment shaders
Accessing shader properties in Cg
Providing vertex data to vertex programs
Built-in state variables in shader programs
GLSL Shader Programs
Advanced ShaderLab topics
Unity's Rendering Pipeline
Performance Tips when Writing Shaders
Rendering with Replaced Shaders
Using Depth Textures
Camera's Depth Texture
Platform Specific Rendering Differences
Shader Level of Detail
ShaderLab builtin values
由www.J2meGame.com精心原創,轉載請說明。http://www.j2megame.com/html/xwzx/ty/3301.html
著色參考
Shaders in Unity can be written in one of three different ways:
Unity3D著色器,可以寫在三種不同的方式之一:
assurface shaders,
asvertex and fragment shaders and
asfixed function shaders.
表面著色,
頂點和片段著色器和
作為固定功能著色
Theshader tutorial can guide you on choosing the right type for your needs.
著色教程可以指導您對您的需求選擇正確的型別
Regardless of which type you choose, the actual meat of the shader code will always be wrapped in a language called ShaderLab, which is used to organize the shader structure. It looks like this:
無論您選擇哪種型別,實際的shader程式碼肉總是會被裹在被稱為ShaderLab一種語言,這是用來組織結構著色。它看起來像這樣:
Shader "MyShader" {
Properties { _MyTexture ("My Texture", 2D) = "white" { }
// other properties like colors or vectors go here as well //其他屬性如顏色或向量 }
SubShader {
// here goes the 'meat' of your
// - surface shader or
// - vertex and program shader or
// - fixed function shader
/ /這裡寫內容
/ / - 表面著色 或
/ / - 頂點和程式著色 或
/ / - 固定功能著色
}
SubShader {
// here goes a simpler version of the SubShader above than can run on older graphics cards
/ /可以執行在舊的顯示卡的著色器
}
}
We recommend that you start by reading about some basic concepts of the ShaderLab syntax in the sections listed below and then to move on to read about surface shaders or vertex and fragment shaders in other sections. Since fixed function shaders are written using ShaderLab only, you will find more information about them in the ShaderLab reference itself.
我們建議您閱讀ShaderLab在下面列出,然後轉移到其他章節中有關表面著色或頂點和片段著色器讀取的部分語法的一些基本概念開始。由於固定功能著色器編寫只能使用ShaderLab,你會發現更多的關於他們的資訊在ShaderLab引用本身。
The reference below includes plenty of examples for the different types of shaders. For even more examples of surface shaders in particular, you can get the source of Unity's built-in shaders from theResources section. Unity'sImage Effects package contains a lot of interesting vertex and fragment shaders.
下面的參考,包括大量的著色不同型別的例子。更多的在粒子系統中使用的表面著色的例子,你可以查閱Unity3D內建的Shader獲得更多資訊。Unity3D的影像效果包中包含了很多有趣的頂點和片段著色器。
Read on for shader reference, and check out theshader tutorial as well!
ShaderLab syntax: Shader
ShaderLab syntax: Properties
ShaderLab syntax: SubShader
ShaderLab syntax: Pass
ShaderLab syntax: Color, Material, Lighting
ShaderLab syntax: Culling & Depth Testing
ShaderLab syntax: Texturing
ShaderLab syntax: Fog
ShaderLab syntax: Alpha testing
ShaderLab syntax: Blending
ShaderLab syntax: Pass Tags
ShaderLab syntax: Name
ShaderLab syntax: BindChannels
ShaderLab syntax: UsePass
ShaderLab syntax: GrabPass
ShaderLab syntax: SubShader Tags
ShaderLab syntax: Fallback
ShaderLab syntax: other commands
Writing Surface Shaders
Surface Shader Examples
Custom Lighting models in Surface Shaders
Surface Shader Lighting Examples
Writing vertex and fragment shaders
Accessing shader properties in Cg
Providing vertex data to vertex programs
Built-in state variables in shader programs
GLSL Shader Programs
Advanced ShaderLab topics
Unity's Rendering Pipeline
Performance Tips when Writing Shaders
Rendering with Replaced Shaders
Using Depth Textures
Camera's Depth Texture
Platform Specific Rendering Differences
Shader Level of Detail
ShaderLab builtin values
由www.J2meGame.com精心原創,轉載請說明。http://www.j2megame.com/html/xwzx/ty/3301.html
相關文章
- Unity3D Shader官方教程翻譯(二)Unity3D
- Unity3D Shader官方教程翻譯(三)----Shader語法:屬性Unity3D
- Unity3D Shader官方教程翻譯(四)----Shader語法:SubShaderUnity3D
- ZooKeeper 官方教程[翻譯]
- [翻譯]CMAKE官方教程
- Pyplot tutorial,Pyplot官方教程自翻譯
- Max/MSP/Jitter 官方教程翻譯11 - 矩陣混合矩陣
- lxml官方入門教程(The lxml.etree Tutorial)翻譯XML
- Moya官方文件翻譯
- docker官方文件翻譯3Docker
- docker官方文件翻譯4Docker
- rabbitmq 官方文件翻譯-2MQ
- docker官方文件翻譯5Docker
- docker官方文件翻譯2Docker
- docker官方文件翻譯1Docker
- Core Foundation 官方文件翻譯
- HTTPie 官方文件中文翻譯版HTTP
- Flutter-Cookbook 非官方翻譯Flutter
- BBNorm官方指導文件翻譯ORM
- [翻譯]ElasticSearch官方文件-簡介Elasticsearch
- Redis-py官方文件翻譯Redis
- Akka官方文件翻譯:Cluster Specification
- ReactiveCocoa 4 官方文件翻譯React
- TypeScript 官方手冊翻譯計劃【一】:基礎TypeScript
- Max/MSP/Jitter 官方教程翻譯05 - 矩陣的數學運算矩陣
- Python heapq模組官方文件翻譯Python
- Unity3D 透明物體ShaderUnity3D
- [翻譯]阮一峰webpack教程(Demo集合)Web
- [譯]記一次Kotlin官方文件翻譯的PR(內聯類)Kotlin
- Max/MSP/Jitter 官方教程翻譯12 - Chromakeying 視訊去背景合成
- ExoPlayer的使用與解析(官方文件翻譯)
- [翻譯]ElasticSearch官方文件-資料的修改Elasticsearch
- Matlab最新的官方文件中文翻譯Matlab
- [翻譯]ElasticSearch官方文件-查詢語言Elasticsearch
- 【Tomcat 6.0官方文件翻譯】—— 簡介Tomcat
- PendingIntent 是個啥?官方文件描述的很到位。我給翻譯翻譯Intent
- NetworkX教程中文翻譯
- Dubbo官方入門Demo(翻譯自http://dubbo.io/主頁入門教程)HTTP