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
相關文章
- ZooKeeper 官方教程[翻譯]
- [翻譯]CMAKE官方教程
- lxml官方入門教程(The lxml.etree Tutorial)翻譯XML
- Max/MSP/Jitter 官方教程翻譯11 - 矩陣混合矩陣
- Moya官方文件翻譯
- docker官方文件翻譯3Docker
- docker官方文件翻譯5Docker
- docker官方文件翻譯2Docker
- docker官方文件翻譯1Docker
- rabbitmq 官方文件翻譯-2MQ
- docker官方文件翻譯4Docker
- Unity3D 透明物體ShaderUnity3D
- HTTPie 官方文件中文翻譯版HTTP
- Flutter-Cookbook 非官方翻譯Flutter
- BBNorm官方指導文件翻譯ORM
- TypeScript 官方手冊翻譯計劃【一】:基礎TypeScript
- Max/MSP/Jitter 官方教程翻譯12 - Chromakeying 視訊去背景合成
- [譯]記一次Kotlin官方文件翻譯的PR(內聯類)Kotlin
- 組複製官方翻譯四、MonitoringGroupReplication
- jepsen 官方文件的中文翻譯版本
- Max/MSP/Jitter 官方教程翻譯05 - 矩陣的數學運算矩陣
- [翻譯]阮一峰webpack教程(Demo集合)Web
- NetworkX教程中文翻譯
- PendingIntent 是個啥?官方文件描述的很到位。我給翻譯翻譯Intent
- kotlinx協程官方文件中文翻譯版本Kotlin
- ExoPlayer的使用與解析(官方文件翻譯)
- ARC186A 官方題解-ChatGPT翻譯ChatGPT
- voltDB官方文件第三章翻譯
- 翻譯:INSERT(已提交到MariaDB官方手冊)
- TypeScript 官方手冊翻譯計劃【十二】:類TypeScript
- Electron教程翻譯2:安裝
- logback官方文件中文翻譯第七章:FiltersFilter
- 翻譯:window function(已提交到MariaDB官方手冊)Function
- 翻譯:TRUNCATE TABLE(已提交到MariaDB官方手冊)
- 翻譯:SET Variable(已提交到MariaDB官方手冊)
- TypeScript 官方手冊翻譯計劃【十三】:模組TypeScript
- 歡迎參與 KubeVela 官方文件翻譯活動
- Detectron2-寫模型(Write Models)官方文件中文翻譯模型
- 翻譯:delete語句(已提交到MariaDB官方手冊)delete