GameDesign 板


LINE

最近有整理Unity Shader Forge Setting说明 大部份内容是我自己脑补(误 给大家参考参考 有写错欢迎指正 也有分享在我的 blog http://riveragamer.blogspot.tw/2017/03/shader-forge.html 1. Shader Settings - Path: 对应Shader选单的名字路径 - FallBack: 预设取代shader。由Pick按钮选取 - LOD: Level of details设定,当物件占萤幕面积超过设定数字(如200) 允许使用此shader - Allow using atlased sprites: 允许使用合成大图(packed atlas) - Draw call batching: 是否允许batching - Inspector preview mode: Material inspector检视的预览物体类型 - Target renderers: 此shader指定支援的硬体环境对象 = Direct3D 9: 旧windows DirectX环境 = Direct3D 11: 新windows DirectX硬体环境,在windows环境使用 Unity Editor编辑时Direct3D 9与Direct3D 11要选取才会正常显示, 不支援PC game环境时,最终版本shader不需要选取Direct3D 9与 Direct3D 11 = OpenGL Core: 泛指OpenGL 1.x/2.x/3.x/4.x环境。没有支援PC game 环境时最终版本shader不需要选取OpenGL Core = OpenGL ES 2.0: 移动装置环境,OpenGL ES2版本 = OpenGL ES 3.0: 移动装置环境,OpenGL ES3版本 = iOS Metal: 移动装置环境,新的iOS绘图环境(建议选取支援) = Direct3D 11 for Windows RT/Phone: Windows Phone(移动装置版本) 支援的Direct3D 11环境 = Xbox One | PlayStation 4 | PlayStation Vita: 各类家用主机情况 = Nintendo 3DS | Nintendo Wii U: 任天堂装置的支援 3. Lighting - Render Path: Unity光照绘图流程方案(LightMode),Forward(预设, 传统直接进行绘图流程))与Deferred(分离式绘图流程) = Forward模式下可设定Light Count。Single Directional(预设) 只允许单一方向光;Multi-light允许场中多个光源(注意每多一个光源会 多跑一次ForwardAdd pass) - LightMode: 已支援的打光方案。Unlit/Custom(未打光);Blinn-Phone ; Phone ; PBL(Physically Based Lighting) = (PBL) Specular Mode分为Specular与Metallic两种反光方案实作 - Gloss Mode: Gloss(光泽感)与Roughness(粗糙感) = Remap gloss from [0-1] to [1-2048]: 更精确地gloss彩度分布计算, 效能代价较高 - Transparency Mode: 透明打光实作方案。Fade(传统渐透明效果); Reflective(保持有真实反光表现) - Energy Consering: 数入与输出结果的光能量是否手恒(对PBL很重要) - Lightmap & light probes: 允许支援Unity5内建的global illumination光照 方案 - Per-pixel light probe sampling: Light probe环景光照侦测计算是否允许 在per-pixel阶段 - Reflection probe support: 是否支援即时反光光照计算 - Receive Ambient Light: 是否能接收基本模糊光源颜色 - Mask directional light specular by shadows 4. Geometry - Face Culling: 排除正面或背面或双面绘图选项 - Normal Quality: Interpolated(直接使用内插结果,较省效能但较不准); Normalized(精确计算) - Vertex Positioning: 顶点位置座标计算模式。World space(一般几何顶点) ;Clip space(萤幕空间顶点,应用在全萤幕後处理时); Billboard(视为面向镜头的Billboard对象) - Normal space: 实做normal mapping(bump mapping)时,normal计算 要采用哪种空间。Tangent(几何表面空间);Object(物体空间); World(世界空间) - Vertex offset mode: 顶点位移方式。Relative(相对偏移);Absolute(顶点 座标直接被新的输入值取代) - Tessellation Mode: 三角形tessellate方法。分为Regular与 Edge length based - Outline Extrude Direction: 边缘几何突出方向选择。有From origin (由原点向顶点座标分量展开);Vertex normals(延着顶点法向量延伸); Vertex colors(由顶点颜色决定偏移量) - Per-pixel screen coordinates: 是否在每个pixel上计算萤幕对应座标 - Show 2D sprite pixel snap option in material: 精确计算2D sprite 对应萤幕座标,实现精准的sprite based game绘图结果 5. Blending - Blend Mode: 透明混合方式。Opaque(不透明);Alpha Blended(透明, 由alpha决定不透明度);Alpha Blended Premultipied(透明, 自身RGBA不变累加上去);Additive(透明,新旧颜色RGBA相加); Screen(透明,旧颜色依新颜色比例衰减);Multiplicative(透明; 新颜色与旧颜色相乘做合成) = 透明混合公式系数: Source(fragment shader产生颜色); Destination(目标frame buffer已存在颜色) - Color Mask: shader写入color buffer时的颜色通道mask - Dithered alpha clip: 使用Opacity Clip功能时,可支援的 dithered alpha clip matrix(2x2;3x3;4x4) - Offset Factor, Offset Units: Polygon offset偏移设定 - Per-object refraction/scene color(expensive): 每个物件使用此 shader时都重新更新refractive texture内容(截取当前萤幕), 效能代价很高 = Texture name/group: 共用的refractive texture名字 - Receive Fog: 是否支援Fog运算 - Auto Sort: 自动设定rendering sort相关参数 = Order: Shader tag中Queue设定值 = Render Type: Shader tag中RenderType设定值 = Depth Test: Depth buffer的深度值比较规则 = Ignore Projectors: 是否呼略projector运算效果 = Write to Depth buffer: 此shader的深度结果是否要写入depth buffer - Stencil Buffer: 此shader是否进行stencil buffer操作 = 可设定Reference Value,Comparison比较规则,Masks for Read Mask和Write Mask - Pass(stencil buffer pass情空下的动作); Fail(stencil buffer fail to pass情况下的动作); Fail Z(depth buffer fail to pass情况下的动作) 6. Experimental - Force Shader Model 2.0: 强迫此shader支援shader model 2 (#pragma target 2.0) - Force no custom shadow pass: 关闭自动产生的shadow pass - Force no fallback: 强迫在shader中不设定fallback shader -- 爱打电动到爱上制作游戏 Blog: http://riveragamer.blogspot.tw/ --



※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 122.117.152.17
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/GameDesign/M.1489546555.A.E9C.html ※ 编辑: riveranb (122.117.152.17), 03/15/2017 10:58:06
1F:推 laikyo: 官方范例的溶解真有趣 03/15 11:40
2F:推 chargo: 推这个吱吱 03/15 12:11
3F:推 gyd: 03/15 13:48
4F:推 sakyer: 推 03/15 19:29
5F:推 Bencrie: 503 大学长先拜一下 orz 03/15 19:35
6F:→ riveranb: 咦,ntou ? XD 03/15 20:05







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:e-shopping站内搜寻

TOP