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. CentOS 7添加本地回环地址

    CentOS 7添加本地回环地址 1. 临时添加ip addr add 10.10.1.1/32 dev lo:1重启失效2.永久添加cd /etc/sysconfig/network-scripts ...

  2. 【CF Round 439 B. The Eternal Immortality】

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  3. 0-1背包问题(经典)HDU2602 Bone Collector

    Bone Collector Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)To ...

  4. 关于#include <bits/stdc++.h>

    经常看人写#include <bits/stdc++.h>却不知道是干啥的? #include<bits/stdc++.h>包含了目前c++所包含的所有头文件 对比: #inc ...

  5. 搜索水题四连发_C++

    特别声明:以下题目有部分为原创题,涉及版权问题,不得转载,违者追究 法律责任! 话说这是一套神题,只有你想不到,没有你做不到 题目更正后比 Pascal 跑得还快哈~ 一道特别裸,但是特别坑的搜索题 ...

  6. pywordfrom

    http://files.cnblogs.com/files/zhang-pengcheng/pywordform-0.02.zip   Win8.1自带微软五笔输入法开启方法

  7. VS2013 生成sqlite3动态连接库及sqlite3.dll的调用

    一,生成sqlite3动态连接库1,去sqlite官网上下载最近的sqlite源码包,解压后得到四个文件:shell.c,sqlite3.c,sqlite3.h,sqlite3ext.h此处还需要sq ...

  8. Xdebug安装对应版本与配置

    Xdebug安装地址https://xdebug.org/download.php,进入下载页面后点击custom installation instructions,可以找到适合的Xdebug版本. ...

  9. HTML5初学笔记

    今天学习了下HTML5的基本知识,用画笔在画布上画了几个东西,效果如图,相关代码如下,注意点总结在末尾: <!DOCTYPE html> <html> <head> ...

  10. 修改 Lua支持中文变量名

    1. 找到 LuaPlus 工程下的 Lua Source Files 下的 llex.c:   2. 在该文件中找到下面所列函数: static int llex (LexState *ls, Se ...