float ConvertDepth( float depthFromTex, float4 cameraParams )
{
const float near = cameraParams.z;
const float far = cameraParams.w;
const float nearMulFar = cameraParams.x;
const float nearSubFar = cameraParams.y;
return nearMulFar / ( depthFromTex * nearSubFar + far );
}

depth linear的更多相关文章

  1. depth and distance

    1down votefavorite   I'm implementing ominidirectional shadow mapping for point lights. I want to us ...

  2. Linear or non-linear shadow maps?

    Quote: Original post by RobMaddisonI understand that, for aliasing mitigation, it might be beneficia ...

  3. 【LeetCode】【Python题解】Single Number & Maximum Depth of Binary Tree

    今天做了三道LeetCode上的简单题目,每道题都是用c++和Python两种语言写的.由于c++版的代码网上比較多.所以就仅仅分享一下Python的代码吧,刚学完Python的基本的语法,做做Lee ...

  4. 测试不同格式下depth buffer的精度

    这篇文章主要是参考MJP的“Attack of The Depth Buffer”,测试不同格式下depth buffer的精度. 测试的depth buffer包含两类: 一是非线性的depth b ...

  5. 机器学习笔记-1 Linear Regression with Multiple Variables(week 2)

    1. Multiple Features note:X0 is equal to 1 2. Feature Scaling Idea: make sure features are on a simi ...

  6. 引擎设计跟踪(九.14.3.1) deferred shading: Depthstencil as GBuffer depth

    问题汇总 1.Light support for Editor编辑器加入了灯光工具, 可以添加和修改灯光. 问题1. light object的用户互交.point light可以把对应的volume ...

  7. Screen Space Depth Varying Glow based on Heat Diffusion

    Inspired by "Interactive Depth of Field Using Simulated Diffusion on a GPU" with heat diff ...

  8. opencv 图像深度(depth)

    原文地址:http://blog.csdn.net/dingfc/article/details/7457984 图像深度是指存储每个像素所用的位数,也用于量度图像的色彩分辨率.图像深度确定彩色图像的 ...

  9. Bayesian generalized linear model (GLM) | 贝叶斯广义线性回归实例

    一些问题: 1. 什么时候我的问题可以用GLM,什么时候我的问题不能用GLM? 2. GLM到底能给我们带来什么好处? 3. 如何评价GLM模型的好坏? 广义线性回归啊,虐了我快几个月了,还是没有彻底 ...

随机推荐

  1. zoj 1508 Intervals (差分约束)

    Intervals Time Limit: 10 Seconds      Memory Limit: 32768 KB You are given n closed, integer interva ...

  2. POJ 1523 SPF 求割点的好(板子)题!

    题意: 给个无向图,问有多少个割点,对于每个割点求删除这个点之后会产生多少新的点双联通分量 题还是很果的 怎么求割点请参考tarjan无向图 关于能产生几个新的双联通分量,对于每个节点u来说,我们判断 ...

  3. 区间(interval)

    区间(interval) 题目描述 zht有一个长度为n的排列P,现在zht想知道,有多少个由连续整数组成的区间[l,r][l,r]可以由PP中的两个区间[a,b],[c,d]拼出,其中1≤a≤b&l ...

  4. Vue组件中的单项数据流

    当子组件中的input v-model 父组件的值时不能直接绑定props的值要使用计算属性,向下面的写法,因为props是单项数据流,子组件不能改变父组件的状态,直接绑定会报错. 还可以这样写:但是 ...

  5. Windows1小时后关机命令

    shutdown -s -t 3600 1.注销当前用户 shutdown - l 该命令只能注销本机用户,对远程计算机不适用. 2.关闭本地计算机 shutdown - s 3.重启本地计算机 sh ...

  6. display 垂直居中

    /* Center slide text vertically */ display: -webkit-box; display: -ms-flexbox; display: -webkit-flex ...

  7. 解决crlf 和 lf不同带来的冲突问题

    crlf 和 lf 是文本换行的不同方式: crlf: "\r\n", windows系统的换行方式 lf: "\n", Linux系统的换行方式 他们之间的不 ...

  8. 洛谷T8115 毁灭

    题目描述 YJC决定对入侵C国的W国军队发动毁灭性打击.将C国看成一个平面直角坐标系,W国一共有n^2个人进入了C国境内,在每一个(x,y)(1≤x,y≤n)上都有恰好一个W国人.YJC决定使用m颗核 ...

  9. win7 无法启动此程序,因为计算机中丢失glut32.dll

    http://zhidao.baidu.com/link?url=9NZxqCvR7hvmKuVR1dUSdQB-TTv_re-g7lp-xZj5FKII04FnMvIKjFhKv299t6wv5Ht ...

  10. web应用性能优化经验总结

    常见性能优化要求      在我经历的性能优化案例中,常见的问题都是这样开始的:      a) 前台访问很慢,请帮忙分析优化      b) 用户对性能很不满意,再不解决就要投诉      c) 数 ...