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. PL/SQL 快速连接数据库

    打开PL/SQL 登录窗口,在数据库地址写入 服务器名:端口号/sid 即可, 例如: 192.168.100.100:1521/test

  2. js实现字体和容器宽高随窗口改变

    用于字体大小和容器的宽高字体和宽高设为rem就可以了 var html = document.documentElement; function fonts(){ var hW = html.offs ...

  3. jquery中的$().each和$.each的区别

    jquery中的$().each和$.each的区别 注意:jquery中的$().each和$.each的区别,前者只能遍历数组,后者可以遍历数组和对象 备注:sinobook项目中地名本体相关地按 ...

  4. git使用笔记 bitbucket基本操作

    实现目标: 1.将本地已经存在的项目文件保存到 bitbucket.org 2.从 bitbucket.org 检出代码库到本地 操作笔记: 1.首先在bitbucket.org创建一个代码库,并得到 ...

  5. 用 State Pattern 来实现一个简单的 状态机

    首先要理解 State Pattern 模式. http://www.dofactory.com/net/state-design-pattern Definition Allow an object ...

  6. 简单的自动升级提示AutoUpdater

    看过网上“圣殿骑士”和其他人的升级做法,感觉不太适合几十M的小型软件. 之前用的一直都是clickonce,但是3年下来感觉弊端太多,比如安装不能选择文件夹.打包不全.版本等问题,于是决定另辟捷径. ...

  7. 树莓派搭建web服务器(详细且良心)

    安装Apache Apache服务器可以从Debian的源中下载.可以用apt下载. 首先要更新apt的软件列表.如果不运行sudo apt-get updata的话,apt软件就不知道有没有新的软件 ...

  8. Ubuntu14.04下如何安装Python爬虫框架Scrapy

    按照官方文档的说明,安装scrapy 需要以下程序或者库: (1).Python 2.7 (2).lxml. Most linux distributions ships PRepackaged ve ...

  9. web统计数据搜集及分析原理

    在现代web应用开发中,数据扮演着越来越重要的角色:通过数据我们能够知道系统哪些地方有待改进,从而迭代开发重新上线, 随后再次通过数据我们来评估新的迭代开发是否满足了我们的预期目标,从而形成了一个数据 ...

  10. SQL Server ->> 斐波那契数列(Fibonacci sequence)

    斐波那契数列(Fibonacci sequence)的T-SQL实现 ;WITH T AS ( AS BIGINT) AS curr, CAST(NULL AS BIGINT) AS prv UNIO ...