1 Lighting computation is handled in eye space(需要根据眼睛的位置来计算镜面发射值有多少进入眼睛), hence, when using GLSL (GPU) to do so, we need to transform vertex from local space to eye space in vertex processor.

2 vec4 ftransform(): 将vertex从eye space转到clip space

3 why procedural texture (generated from the program not by reading from the image) is infinite?

Because we could draw a 3D scene in the computer, this scene is infinite. We see it from a certain direction then use this view (frame) (就是用此时看到的情景作为texture) as texture. Hence, the texture is like the scene we view in natural life, it is infiinite.

4 bump mapping 示例

5 Refraction (折射) 示例

Step deep into GLSL的更多相关文章

  1. bzoj4381: [POI2015]Odwiedziny

    这题搞了我一下午……因为一些傻X的问题…… 对于步长大于sqrt(n)的询问,我们可以直接暴力求解 然后,我们可以事先预处理出d[u][step]表示u往上跳,每次跳step步,直到跳到不能跳为止,所 ...

  2. 【BZOJ5194】Snow Boots

    [原题题面]传送门 [简化题意] 给定一个长度为n的序列. 有m次询问,每次询问给定两个数si,di.你一开始站在0,每次你可以走不超过di,但你到达的位置的数不能超过si.问能否走到n+1. n,m ...

  3. HDU1560 DNA sequence(IDA*)题解

    DNA sequence Time Limit: 15000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) To ...

  4. poj2965 The Pilots Brothers' refrigerator(直接计算或枚举Enum+dfs)

    转载请注明出处:http://blog.csdn.net/u012860063? viewmode=contents 题目链接:http://poj.org/problem? id=2965 ---- ...

  5. Minimum Cut

    Minimum Cut Time Limit: 3000/2000 MS (Java/Others)    Memory Limit: 65535/102400 K (Java/Others)Tota ...

  6. 「NOIP2016」天天爱跑步 题解

    (声明:图片来源于网络) 「NOIP2016」天天爱跑步 题解 题目TP门 题目 题目描述 小c同学认为跑步非常有趣,于是决定制作一款叫做<天天爱跑步>的游戏.<天天爱跑步>是 ...

  7. Neural Networks and Deep Learning(week4)Building your Deep Neural Network: Step by Step

    Building your Deep Neural Network: Step by Step 你将使用下面函数来构建一个深层神经网络来实现图像分类. 使用像relu这的非线性单元来改进你的模型 构建 ...

  8. 课程一(Neural Networks and Deep Learning),第四周(Deep Neural Networks)——2.Programming Assignments: Building your Deep Neural Network: Step by Step

    Building your Deep Neural Network: Step by Step Welcome to your third programming exercise of the de ...

  9. 使用Visual Studio SDK制作GLSL词法着色插件

    使用Visual Studio SDK制作GLSL词法着色插件 我们在Visual Studio上开发OpenGL ES项目时,避免不了写Shader.这时在vs里直接编辑shader就会显得很方便. ...

随机推荐

  1. poj 1743 二分答案+后缀数组 求不重叠的最长重复子串

    题意:给出一串序列,求最长的theme长度 (theme:完全重叠的子序列,如1 2 3和1 2 3  or  子序列中每个元素对应的差相等,如1 2 3和7 8 9) 要是没有差相等这个条件那就好办 ...

  2. MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法

    MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法 1 问题 [root@localhost m ...

  3. Hibernate之多对多

    一.项目结构如下图 二.保存学生和课程及其学生选课关系代码如下(测试类中不能再有双向关联,否则会报错,因为,都维护了中间表外键,会有中间表外键冲突,如果非要写双向关联,就需要配置中设置某一方维护主键, ...

  4. Java 获取距离最近一段时间的时间点

    if (timeFilter == 1) {// 最近三个月 long curTimeSeconds = System.currentTimeMillis() / 1000L; para.put(&q ...

  5. 面试题52:缺少i的乘积数组

    vector<int> multiply(const vector<int>& A) { int len = A.size(); vector<); result ...

  6. JS自动格式化输入的数字/千位分隔符VIEW:858

    <script> function cc(s){ if(/[^0-9\.]/.test(s)) return "invalid value"; ss=s.replace ...

  7. 测试Swift语言代码高亮-使用highlight.js

    func &( left:OCBool, right: OCBool)->OCBool{ if left{ return right } else{ return false } }

  8. Entity Framework在SaveChanges()之前拿到对象的自增长ID

    现有两张表A.B在一个dbContext中更新,且A表的ID为B的外键, Insert(A); B.aid=A.ID; Insert(B); SaveChanges() 按照这个顺序就可以了满足要求, ...

  9. HDU 1029 Ignatius and the Princess IV

    解题报告: 题目大意:就是要求输入的N个数里面出现的次数最多的数是哪一个,水题.暴力可过,定义一个一位数组,先用memset函数初始化,然后每次输入一个数就将下标对应的上标对应的那个数加一,最后将整个 ...

  10. python4delphi 安装

    环境搭建: 目前p4d已经可以支持到XE7,可惜googlecode即将关闭,不知道作者是否会在github上继续更新. 因为此开源项目历史较久远,拿到源代码后可能还需要手动修改相关的文件引用,毕竟需 ...