Author: http://www.cnblogs.com/open-coder/p/3898159.html

The light mapping effects between PC and Mobile become very incosistant just as following:

With the same light maps, the left one is the Android Platform, and the right one is the PC Platform. But the right one is much brigher than the left one.
Why? ????????????
Let check the Unity3D light map decode function:

The reason is that the light map encode use High dynamic range encode. The range on the PC is [0, 8], but the range on the Mobile will only in [0, 2].
That means the when you switch the platform from PC to Android, the light map color range will clamp to [0, 2] no matter what value it is.
And the best way to keep light map consistant on PC and Android is keep the light map color range in [0, 2].
Sometimes, we would like to multiply the light map color with a factor. I strongly suggest that please make sure this factor larger than 1.0 (Only bright is instead of darker it).

One altive method is also keep RGBM encode for light map on the mobile platform. Bake the light maps on the PC first, then retrieve those PC RGBM lightmaps out of the scene saved them as RGBM texture. Relink the scene light map setting with those RGBM textures.  Since we need a high precision for alpha channel, we need to save the alpha as another texture. That means we need two light maps on mobile device, one for RGB and another with one channel only to keep the M. The shader should be re-write too, Far and Near lightmaps could be keep as those two light map slots. Remember that here you need to keep a much higher precision for light intensity that value may more than 2, so you need to use at least half type variable to hold those immediate values in the shader.

Inconsistant light map between PC and Mobile under Unity3D的更多相关文章

  1. zepto点击事件兼容pc和mobile

    判断pc还是mobile,重写click事件 var CLICK='click'; (function browserRedirect() { var sUserAgent = navigator.u ...

  2. HTML5 PC、Mobile调用摄像头(navigator.getUserMedia)

    废话少说,先贴上代码 html: <div id="main" class="masthead"> <div id="face_sc ...

  3. 判断PC或mobile设备

    js 限制: <script type="text/javascript"> function uaredirect(f){try{if(document.getEle ...

  4. Launch Google Map in Android / IOS Mobile

    <!--This only works in android mobile phone--><a href="geo:0,0?q=myaddress+encode)__&q ...

  5. 伪响应式开发(PC和Mobile分离)

    screen.width 无论把浏览器缩小还是放大,screen.width的值都不会改变,但是IE9及以上浏览器才支持这个属性. @media screen 媒体查询的巨大缺陷:切换页面布局的时候J ...

  6. nginx 区分pc和mobile 到不同的404页面

    if ($http_user_agent ~* '(Android|webOS|iPhone|iPod|BlackBerry|vivo)') { set $mobile_request '1'; } ...

  7. PC windows mobile 文件拷贝

    在windows 系统中提供 RAPI.DLL,只需将RAPI.DLL中的,函数导出就可以实现文件拷贝.

  8. light Map

    Unity5中lightmap的坑 http://blog.csdn.net/langresser_king/article/details/48914901 Unity中光照贴图一二坑及解决办法 h ...

  9. 百度地图Map属性和方法

    map的L属性:TANGRAM__1 map的F属性:[object Object] map的xa属性:[object HTMLDivElement] map的width属性:1340 map的hei ...

随机推荐

  1. 005hystrix.stream信息聚合Turbine

    1.POM配置 和普通Spring Boot工程相比,仅仅添加了Turbine和Spring Boot Starter Actuator依赖 <dependencies> <!--添 ...

  2. .NET开源工作流RoadFlow-流程运行-工作委托

    如果某一个人某一段时间不在单位,则可以将自己的工作委托给他人代为处理. 在 流程处理-->工作委托 中可以管理自己的委托,管理员也可以在 流程管理-->工作委托 中管理所有人的委托: 委托 ...

  3. 【阿里云产品公测】OpenSearch初体验

    OpenSearch是一个非常有意义的功能,对于很多数据量较大的站点, SF2<   如果搜索功能自己做的话,或者用数据库里的查询语句,首先效率低下,而且占用资源. ); <Le6   另 ...

  4. 通过游戏学敏捷:只通过Specification来传递需求

    转自:https://mp.weixin.qq.com/s/jAYbAMUTNYGh4RxGPAZ1AQ 活动把每个小组(4-5个人)中的2人留在屋子里,其他人到屋子外面等待.在屋子里的人,会得到一张 ...

  5. Javascript 删除tr 元素

    Javascript 删除tr 元素   function delete1(obj){ var tr=obj.parentNode.parentNode; var tbody=tr.parentNod ...

  6. iptables:no config file

    防火墙规则默认都是在/etc/sysconfig/iptables这个文件中的 出现这个问题,是因为在/etc/sysconfig/目录下没有找到iptables这个文件 可以使用service ip ...

  7. Centos如何通过yum安装php7

      执行如下命令安装epel yum -y install epel-release   更换rpm源,请根据自己的centos版本选择相应的rpm源进行安装 Centos 5.X: rpm -Uvh ...

  8. io问题导致的insert缓慢

    生产环境一日常insert在业务量加倍之后非常缓慢,对有问题sql做awr报告和10046trace得出以下结论:In the 10046 trace, the execution of sql el ...

  9. mxnet 神经网络训练和预测

    https://mxnet.incubator.apache.org/tutorials/basic/module.html import logging import random logging. ...

  10. 单表60亿记录等大数据场景的MySQL优化和运维之道 | 高可用架构

    015-08-09 杨尚刚 高可用架构 此文是根据杨尚刚在[QCON高可用架构群]中,针对MySQL在单表海量记录等场景下,业界广泛关注的MySQL问题的经验分享整理而成,转发请注明出处. 杨尚刚,美 ...