unity3D Text 使用shader
2015-12-01 12:38
453 查看
unity里面的3dtext可以很方便得使用,包括了替换材质等等
替换字体简单的就是下面视图步骤,注意使用的Texture是导入字体后的Texture
shader使用以下基本写法,稍稍更改下就行
http://wiki.unity3d.com/index.php?title=3DText
替换字体简单的就是下面视图步骤,注意使用的Texture是导入字体后的Texture
shader使用以下基本写法,稍稍更改下就行
ShaderLab - 3DText.shader Shader "GUI/3D Text Shader" { Properties { _MainTex ("Font Texture", 2D) = "white" {} _Color ("Text Color", Color) = (1,1,1,1) } SubShader { Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } Lighting Off Cull Off ZWrite Off Fog { Mode Off } Blend SrcAlpha OneMinusSrcAlpha Pass { Color [_Color] SetTexture [_MainTex] { combine primary, texture * primary } } } } ShaderLab - 3DTextOneSided.shader Replacing "Cull Off" to "Cull Back", makes the text one sided. Shader "GUI/3D Text Shader - Cull Back" { Properties { _MainTex ("Font Texture", 2D) = "white" {} _Color ("Text Color", Color) = (1,1,1,1) } SubShader { Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } Lighting Off Cull Back ZWrite Off Fog { Mode Off } Blend SrcAlpha OneMinusSrcAlpha Pass { Color [_Color] SetTexture [_MainTex] { combine primary, texture * primary } } } }链接
http://wiki.unity3d.com/index.php?title=3DText
相关文章推荐
- Unity版本更新关注
- 摆脱臃肿--Unity3D安卓包减肥秘笈
- 关于DebuggerHidden特性在Unity中的使用
- Unity游戏开发——自动为动画剪辑添加事件 之 最后几帧的事件不能被调用的问题
- 【Unity】使用射线碰撞限制人物主角多次跳跃
- Unity3D shader
- unity3d 官方文档的调试方法
- 跨平台AR增强现实开发(一)(AR开发环境的搭建)
- Unity3D深入浅出 - 新版动画系统(Mecanim)
- Unity3D 4.0新功能:Mecanim动画系统基础教程
- unity学习路程--button按钮触发事件及切换场景
- unity5.2 ulna的simple frame导入和pblua 的生成
- 如何同时打开多个Unity软件
- unity基础
- Unity3D 自由视角代码之解析
- playmaker学习
- Uni2D 学习
- Unity3d学习11
- Unity3d学习10
- Unity3d学习08