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. windows安装 Nodejs,NPM, CNPM

    1, dowload Nodejs from :  http://nodejs.cn/download/ 下载完毕后,可以安装node,建议不要安装在系统盘(本例安装在 D:\vueProject) ...

  2. JZOJ 5305 C先生

    题意: 有一个n个点,m条边的图,没有重边.自环,且每一条边最多属于一个环路. 给出q组询问,每次询问u,v两点间的路径有多少种可能. 思路: 先看下方样例说明: 由样例说明可以得知,路径上每经过一个 ...

  3. 《c程序设计语言》读书笔记-4.12-递归整数转字符串

    #include <stdio.h> #include <math.h> #include <stdlib.h> void itoa_num(int n, char ...

  4. 3.2 Lucene实战:一个简单的小程序

    在讲解Lucene索引和检索的原理之前,我们先来实战Lucene:一个简单的小程序! 一.索引小程序 首先,new一个java project,名字叫做LuceneIndex. 然后,在project ...

  5. Hibernate中双向多对多的两种配置方式

    Hibernate中双向多对多的两种配置方式 1.建立多对多双向关联关系 package cn.happy.entitys; import java.util.HashSet; import java ...

  6. matlab sqlite

    转自: http://www.douban.com/note/359606646/和http://blog.csdn.net/yinxing408033943/article/details/7677 ...

  7. python enumerate元素的时候可以获取下标,并且可以指定开始的下标值。

    list=["a","b","c","d","e"] for i,item in enumerate ...

  8. Linux安转scala

    1. 创建目录 > mkdir  /opt/scala > cd  /opt/scala 2. 下载scala压缩包到上述目录 scala-2.12.6.tgz 3. 解压缩.建立软连接 ...

  9. python+requests接口自动化完整项目设计源码【转载】

    本篇转自博客:上海-悠悠 原文地址:http://www.cnblogs.com/yoyoketang/tag/python%E6%8E%A5%E5%8F%A3%E8%87%AA%E5%8A%A8%E ...

  10. Laravel使用Eloquent ORM操作数据库

    1.定义模型 <?php namespace App; use Illuminate\Database\Eloquent\Model; class Flight extends Model{ p ...