Inconsistant light map between PC and Mobile under Unity3D
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的更多相关文章
- zepto点击事件兼容pc和mobile
判断pc还是mobile,重写click事件 var CLICK='click'; (function browserRedirect() { var sUserAgent = navigator.u ...
- HTML5 PC、Mobile调用摄像头(navigator.getUserMedia)
废话少说,先贴上代码 html: <div id="main" class="masthead"> <div id="face_sc ...
- 判断PC或mobile设备
js 限制: <script type="text/javascript"> function uaredirect(f){try{if(document.getEle ...
- Launch Google Map in Android / IOS Mobile
<!--This only works in android mobile phone--><a href="geo:0,0?q=myaddress+encode)__&q ...
- 伪响应式开发(PC和Mobile分离)
screen.width 无论把浏览器缩小还是放大,screen.width的值都不会改变,但是IE9及以上浏览器才支持这个属性. @media screen 媒体查询的巨大缺陷:切换页面布局的时候J ...
- nginx 区分pc和mobile 到不同的404页面
if ($http_user_agent ~* '(Android|webOS|iPhone|iPod|BlackBerry|vivo)') { set $mobile_request '1'; } ...
- PC windows mobile 文件拷贝
在windows 系统中提供 RAPI.DLL,只需将RAPI.DLL中的,函数导出就可以实现文件拷贝.
- light Map
Unity5中lightmap的坑 http://blog.csdn.net/langresser_king/article/details/48914901 Unity中光照贴图一二坑及解决办法 h ...
- 百度地图Map属性和方法
map的L属性:TANGRAM__1 map的F属性:[object Object] map的xa属性:[object HTMLDivElement] map的width属性:1340 map的hei ...
随机推荐
- JS实现九九乘法表和时间问候语
编码 小练习,练习使用循环实现一个九九乘法表 第一步,最低要求:在Console中按行输出 n * m = t 然后,尝试在网页中,使用table来实现一个九九乘法表 <!DOCTYPE htm ...
- HADOOP背景介绍
1. HADOOP背景介绍 1.1 什么是HADOOP 1. HADOOP是apache旗下的一套开源软件平台 2. HADOOP提供的功能:利用服务器集群,根据用户的自定义业务逻辑,对海量数据进行分 ...
- for 循环的时候 append() 是移动不是复制
使用for 的时候,append() 不是复制,而是移动,只有最后一个元素才真正的append() 到了 解决办法: 1. 使用字符串: 2.使用clone();
- hdu 1102 Constructing Roads (Prim算法)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1102 Constructing Roads Time Limit: 2000/1000 MS (Jav ...
- 定制化移动办公APP:打造企业专属的“钉钉”“纷享销客”,实现企业办公管理一体化
一.项目背景 随着信息化社会的高速发展,市场竞争日益激烈,传统的管理和办公系统多且复杂,用户需要使用多个系统才可完成一项工作,而且各个系统的界面和风格存在差异,造成了信息查找不便,大大降低了用户的工作 ...
- day22笔记
用户上传的文件要保存 保存在服务器上的media文件夹下,用户上传的文件很多,所以需要分目录进行存放具体步骤 settings.pyMEDIA_URL="/media/"MEDIA ...
- css properties
white-space:描述如何处理元素中的空格 word-wrap:(以单词为单位,比如长单词则转行拆分,短单词则直接留空换行!) 用来说明当一个不能被分开的字符串太长因而其containing b ...
- Windows下sc create命令行添加/创建/修改服务
添加服务: sc create TestService binpath= "D:\TestApp\TestService.exe" 注意:所有的等号和值之间需要一个空格(等号前不要 ...
- C#连接SQL Server测试
string con, sql; con = "Server=192.168.31.26;Database=TestDB;user=kala;pwd=Password"; sql ...
- 纯CSS画的基本图形
图形包括基本的矩形.圆形.椭圆.三角形.多边形,也包括稍微复杂一点的爱心.钻石.阴阳八卦等.当然有一些需要用到CSS3的属性,所以在你打开这篇文章的时候,我希望你用的是firefox或者chrome, ...

