UNITY SHADER入门精要_学习笔记1
2017-04-07 10:35
281 查看
1.注意OpenGL和DirectX的坐标轴:
2.部分专业名词介绍
#pragma surface surfaceFunction lightModel[optionalparams]
声称着色器 表面着色器 着色器代码名称 光照模型
It uses #pragma surface ... directive to indicate it’s a surface shader.
eg:#pragma surface surf Standard fullforwardshadows
介绍lightModel
1.Standard:
This lighting model uses SurfaceOutputStandard output struct,
and matches the Standard (metallic workflow) shader in Unity.
2.Standard:
This Specular lighting model uses SurfaceOutputStandardSpecular output struct,
and matches the Standard (specular setup) shader in Unity.
3.Lambert and BlinnPhong:郎伯模型
This lighting models are not physically based (coming from Unity 4.x),
but the shaders using them can be faster to render on low-end hardware.
3.Unity shader类型
1)Standard Surface Shader:标准光照模型
2)Standard Surface Shader(instanced)
3)Unlit Shader:不包含光照,包含雾效
4)Image Effect Shader:实现屏幕后处理效果
5)Compute Shader:产生一个特殊的shader文件,目的是利用cpu的并行性进行一些与常规渲染流水线无关·
4.Unity Shader语法
5.自定义材质编辑界面:https://docs.unity3d.com/Manual/SL-CustomShaderGUI.html
2.部分专业名词介绍
#pragma surface surfaceFunction lightModel[optionalparams]
声称着色器 表面着色器 着色器代码名称 光照模型
It uses #pragma surface ... directive to indicate it’s a surface shader.
eg:#pragma surface surf Standard fullforwardshadows
介绍lightModel
1.Standard:
This lighting model uses SurfaceOutputStandard output struct,
and matches the Standard (metallic workflow) shader in Unity.
2.Standard:
This Specular lighting model uses SurfaceOutputStandardSpecular output struct,
and matches the Standard (specular setup) shader in Unity.
3.Lambert and BlinnPhong:郎伯模型
This lighting models are not physically based (coming from Unity 4.x),
but the shaders using them can be faster to render on low-end hardware.
3.Unity shader类型
1)Standard Surface Shader:标准光照模型
2)Standard Surface Shader(instanced)
3)Unlit Shader:不包含光照,包含雾效
4)Image Effect Shader:实现屏幕后处理效果
5)Compute Shader:产生一个特殊的shader文件,目的是利用cpu的并行性进行一些与常规渲染流水线无关·
4.Unity Shader语法
5.自定义材质编辑界面:https://docs.unity3d.com/Manual/SL-CustomShaderGUI.html
相关文章推荐
- Unity Shader入门精要学习笔记 - 第3章 Unity Shader 基础
- Unity Shader入门精要学习笔记 - 第7章 基础纹理
- Unity Shader入门精要学习笔记 - 第3章 Unity Shader 基础
- Unity Shader入门精要学习笔记 - 第10章 高级纹理
- Unity Shader入门精要学习笔记 - 第5章 开始 Unity Shader 学习之旅
- Unity Shader入门精要学习笔记 - 第4章 学习 Shader 所需的数学基础
- Unity Shader入门精要学习笔记 - 第5章 开始 Unity Shader 学习之旅
- Unity Shader入门精要学习笔记 - 第11章 让画面动起来
- Unity Shader入门精要学习笔记 - 第14章 非真实感渲染
- Unity Shader入门精要学习笔记 - 第15章 使用噪声
- Unity Shader入门精要学习笔记 - 第3章 Unity Shader 基础
- Unity Shader入门精要学习笔记 - 第15章 使用噪声
- Unity Shader入门精要学习笔记 - 第7章 基础纹理
- Unity Shader入门精要学习笔记 - 第9章 更复杂的光照
- [置顶] Unity Shader入门精要学习笔记 - 第2章 渲染流水线
- UnityShader入门精要学习笔记(十三):光照衰减与Unity阴影
- UnityShader入门精要学习笔记(八):基础纹理之凹凸映射
- UnityShader入门精要学习笔记(十五):渲染纹理
- UnityShader入门精要学习笔记(六):Unity中实现高光反射模型
- UnityShader入门精要学习笔记(一):渲染流水线