这节主要记录的是第二个Subshader的具体效果,相对于的vert200, vert300顶点着色器主要会对mesh中的顶点进行变换,主要函数是Gerstner,根据gpugems第一小节的描述,Gerstner wave function是对 sin() 次方运算的简化版,具体公式如下,下面的条...
分类:
其他好文 时间:
2015-10-20 21:18:13
阅读次数:
273
在GPU Gems1的第一小节中,可以看到通过Gerstner wave function来模拟海洋的波浪效果,同时在Unity自带的Water(Pro)效果中,FX/Water4中的部分水波效果正是通过该公式来模拟的。 首先来看看FX-Water4.shader的代码。 Tags {"...
分类:
其他好文 时间:
2015-10-19 00:42:11
阅读次数:
299
来美国打工一段时间了,早上上班的时候突然发现仪表盘上一个黄灯亮了,对车不在行,还以为是油加多了,大胆的开上了高速,到 公司也忘了,又开着上高速回家了。回家快睡觉的时候才想起来,看了一下manual,说那个是TPMS灯(Tire Pressure Motoring System), 轮胎压力监测系统,说明好像是车胎气压不对了,应该是哪个轮胎漏气了。自己下楼去车库挨个轮胎按了下,好像都不缺气啊,国内买...
分类:
其他好文 时间:
2015-10-15 13:02:05
阅读次数:
194
大家都应该知道APK文件其实就是一个MIME为ZIP的压缩包,我们修改ZIP后缀名方式可以看到内部的文件结构,例如修改后缀后用RAR打开鳄鱼小顽皮APK能看到的是(Google Play下载的完整版版本): Where‘s My Water.zip...
分类:
其他好文 时间:
2015-10-13 17:25:59
阅读次数:
278
翻译给定n个非负整数a1,a2,...,an,其中每个代表一个点坐标(i,ai)。n个垂直线段例如线段的两个端点在(i,ai)和(i,0)。找到两个线段,与x轴形成一个容器,使其包含最多的水。备注:你不必倾倒容器。翻译Given n non-negative integers a1, a2, ..., an,
where each represents a point at coordinate...
分类:
其他好文 时间:
2015-10-12 22:45:47
阅读次数:
214
就是一个网络流。red结点容量为2,查看最大流量是否大于等于2。对于条件2,把边反向加入建图。条件1,边正向加入建图。 1 /* 4183 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include...
分类:
其他好文 时间:
2015-10-10 00:29:32
阅读次数:
398
链接:https://leetcode.com/problems/trapping-rain-water/【描述】Givennnon-negative integers representing an elevation map where the width of each bar is 1, c...
分类:
移动开发 时间:
2015-10-08 09:05:56
阅读次数:
255
QuestionGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after ra...
分类:
移动开发 时间:
2015-10-08 07:59:25
阅读次数:
158
题目: Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoint....
分类:
其他好文 时间:
2015-10-06 14:06:00
阅读次数:
216
Lake CountingTime Limit:1000MSMemory Limit:65536KTotal Submissions:24578Accepted:12407DescriptionDue to recent rains, water has pooled in various plac...
分类:
其他好文 时间:
2015-10-04 22:21:03
阅读次数:
266