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. Dockerfile定制镜像

    一.Dockerfile是什么? 镜像定制实质就是定制每一层所添加的配置.文件. Dockerfile就是一个脚本来构建和定制镜像,把每一层的修改.安装.构建.操作都写入脚本.以此来解决体积.镜像构建 ...

  2. Java Jsp使用

    1.Jsp基础 1)Jsp的执行过程 tomcat服务器完成:jsp文件->翻译成java文件->编译成class字节码文件-> 构造类对象-> 调用方法 tomcat的wor ...

  3. Java中避免空指针的几个方法

    equals Object类中的equals 方法在非空对象引用上实现相等关系,具有对称性 x.equals(y) 和 y.equals(x) 结果是一样的,但当x == null时会抛出空指针异常 ...

  4. if(!IsPostBack)

    作用: Page.IsPostBack 是用来检查目前网页是否为第一次加载,当使用者第一次浏览这个网页时Page.IsPostBack 会传回False,不是第一次浏览这个网页时就传回True:所以当 ...

  5. 基于SignalR的站点有连接数限制问题及解决方案

    最近在做一个Web项目,由于需要实现客户端和服务器的双向通信,所以就用到了SignalR2.0:站点的运行环境是Win7服务器,IIS7,但遇到了一个问题,就是当客户端连接数到达10个以后,后面的用户 ...

  6. vs2010开发activex(MFC)控件/ie插件(一)

    原文:http://blog.csdn.net/yhhyhhyhhyhh/article/details/50782904  vs2010开发activex(MFC)控件:      第一步:生成ac ...

  7. linux 安装源码后的操作 ldconfig

    https://blog.csdn.net/cqkxboy168/article/details/8657487 知识点: .如果使用 ldd 命令时没有找到对应的共享库文件和其具体位置,可能是两种情 ...

  8. jq重复切换类名

    //重复切换类名"active"$(".probability-rules header").toggleClass("active");

  9. [转]优化IIS7.5支持10万个同时请求的配置方法

    通过对IIS7的配置进行优化,调整IIS7应用池的队列长度,请求数限制,TCPIP连接数等方面,从而使WEB服务器的性能得以提升,保证WEB访问的访问流畅 通过对IIS7的配置进行优化,调整IIS7应 ...

  10. 关于tcp状态及一些延展

    1.常用的三个状态是:ESTABLISHED 表示正在通信,TIME_WAIT 表示主动关闭,CLOSE_WAIT 表示被动关闭. TCP协议规定,对于已经建立的连接,网络双方要进行四次握手才能成功断 ...