Amplify shader editor_案例分析4_Burn

案例中的几个要点。
1.手动设置Normal map。
一般我们需要在Inspector中将法线纹理的类型选择为Normal map 如下图。
在这里插入图片描述
如果我们没有设置Normal map,我们需要将法线纹理的颜色值重新映射回法线方向,如下。这样也是可以得到正确的法线方向。

fixed4 normal = tex2D(_Bump, i.uv);
	norm.xyz = norm.xyz * 2 - 1

一般来说我们将纹理设置为Normal map,再调用UnpackNormal函数就可以得到正确的法线方向的值。

Unity采用的压缩方式是DXT

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
NEW! Support for Lightweight SRP NEW! Multi-Pass on Templates NEW! Compatibility with Unity 2018 NEW! Xbox One/PS4/Switch Support NEW! Texture Array Creator tool NEW! Terrain support NEW! Shader Templates • Lightweight PBR SRP • Lightweight Unlit SRP • Post-Process effects • Alpha-Blended particles • Sprite • Unlit • UI New Samples • SRP Lightweight 2D Fractal • Projectors • XRay • Single Channel Masking by Sarah Akers and David Marshall • Stylized Skybox by BOXOPHOBIC • Melting by Gil Damoiseaux New Shader Functions • Detail Albedo • Fetch Lightmap Value • Lerp White To New Template • Lightweight Unlit SRP New Nodes • Transform Position • Transform Direction Latest Improvements • Amplify Shader Editor now supports Lightweight SRP v1.1.10 via templates. • Support for Specular workflow into Lightweight PBR SRP template. • Templates can now be Multi-Pass. • Amplify Shader Editor is now compatible with Unity 2018. • Official support for Xbox One/PS4/Switch. • Texture Array Creator tool now also creates 3D Textures. • Can create terrain shaders, completely from within ASE without external editing required. • Improved templates loading behavior after hot code reload. • Pragmas, Defines and Includes are now set over a single reorderable list. • Blend, Cull, Stencil, Color Mask and Depth options can now reference properties. • Properties now can have custom attributes. • Improved editor rendering pipeline leading to huge performance boost. • Reduced editor memory allocations resulting on a low Garbage Collector impact. • Editor more snappy and responsive when auto panning and zooming. • Multiple fixes over various nodes, editor and samples. Learn more: Amplify Wiki Discuss here: Unity Forum Thread Shader Samples: Full List The Editor will continue to be improved in future updates, there are a lot more features currently in development. Notable Features • Full source-code • Support for Xbox One/PS4/Switch • Custom Node API • Shader Templates • Shader Functions • Multi

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值