depth and distance
I'm implementing ominidirectional shadow mapping for point lights. I want to use a linear depth which will be stored in the color textures (cube map). A program will contain two filtering techniques: software pcf (because hardware pcf works only with depth textures) and variance shadow mapping. I found two ways of storing linear depth:
What are differences between them ? Are both ways correct ? For the standard shadow mapping with software pcf a shadow test will depend on the linear depth format. What about variance shadow mapping ? I implemented omnidirectional shadow mapping for points light using a non-linear depth and hardware pcf. In that case a shadow test looks like this:
I also implemented standard shadow mapping without pcf which using second format of linear depth: (Edit 1: i.e. distance to the light + some offset to fix shadow acne)
but I have no idea how to do that for the first format of linear depth. Is it possible ? Edit 2: For non-linear depth I used glPolygonOffset to fix shadow acne. For linear depth and distance to the light some offset should be add in the shader. I'm trying to implement standard shadow mapping without pcf using a linear depth (-viewSpace.z * linearDepthConstant + offset) but following shadow test doesn't produce correct results:
How to fix that ? |
||||
add comment |
The method with You could store either one, but you have to be consistent about it. If you store distance instead of depth when you render your shadow map, you have to compare against distance instead of depth when you apply the shadow map. Depth is the natural choice as that's what will be generated by the GPU rasterizer when you draw the shadow map. It takes extra work to convert it to distance (you have to set up the |
depth and distance的更多相关文章
- 引擎设计跟踪(九.14.3.1) deferred shading: Depthstencil as GBuffer depth
问题汇总 1.Light support for Editor编辑器加入了灯光工具, 可以添加和修改灯光. 问题1. light object的用户互交.point light可以把对应的volume ...
- SOCV / POCV 模型 (3)
STA无疑是数字集成电路设计实现方法学中最『漂亮』的模型之一,但是随意着工艺进步,local varition 的随机性及重要性增加,传统STA 的局限性日渐突出.大概在十五年前,SSTA成了一个研究 ...
- STA之AOCV
为什么要引入AOCV 为了精确性,为了剔除悲观度.用set_timing_derate来设置OCV,对于一个固定的corner,只能对data/clock, cell/net, late/early分 ...
- poj 1986 Distance Queries LCA
题目链接:http://poj.org/problem?id=1986 Farmer John's cows refused to run in his marathon since he chose ...
- Kinect SDK C++ - 2. Kinect Depth Data
Today we will learn how to get depth data from a kinect and what the format of the data is kinect co ...
- POJ 1986 Distance Queries / UESTC 256 Distance Queries / CJOJ 1129 【USACO】距离咨询(最近公共祖先)
POJ 1986 Distance Queries / UESTC 256 Distance Queries / CJOJ 1129 [USACO]距离咨询(最近公共祖先) Description F ...
- distance field(占坑
signed distance field https://kosmonautblog.wordpress.com/2017/05/09/signed-distance-field-rendering ...
- Depth Buffer
Up until now there is only one type of output buffer you've made use of, the color buffer. This chap ...
- depth peeling实现半透明
aaarticlea/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aH
随机推荐
- java JVM垃圾回收机制
Java语言出来之前,大家都在拼命的写C或者C++的程序,而此时存在一个很大的矛盾,C++等语言创建对象要不断的去开辟空间,不用的时候有需要不断的去释放控件,既要写构造函数,又要写析构函数,很多时候都 ...
- eclipse启动无响应,停留在Loading workbench状态,或老是加载不了revert resources
做开发的同学们或多或少的都会遇到eclipse启动到一定程度时,就进入灰色无响应状态再也不动了.启动画面始终停留在Loading workbench状态.反复重启,状态依旧. 多数情况下,应该是非正常 ...
- Silverlight C1.Silverlight.FlexGrid 表格动态列
很多时候,我们对于表格展示的数据,需要根据条件不停的变化,这就需要表格列能动态生成,即没有Model的概念(万物始于无形).先上主要代码: 一.根据参数绑定列定义 二.根据数据动态创建数据对象,并添加 ...
- [转]深入理解mysqldump原理 --single-transaction --lock-all-tables --master-data
本文转至:http://blog.csdn.net/cug_jiang126com/article/details/49824471 在mysqldump过程中,之前其实一直不是很理解为什么加了--s ...
- Android 网络开发免费API接口
http://www.juhe.cn/ 聚合数据 目前很多接口都收费 https://www.showapi.com ...
- 准备找工作第三天——java基础_由有道云笔记倒入
循环:跳出多重循环:通过设置标号: 1 ok: 2 for(int i=0;i<10;i++) 3 { 4 for(int j=0;j<10;j++) 5 { ...
- php socket获取数据类
<?php define("CONNECTED", true); define("DISCONNECTED", false); /** * Socket ...
- delphi 获取图片某一像素的颜色值
前言:在VCL里有GetPixel函数,可直接用,在FMX里直接用这个函数没有定义,在FMX的library中找这个函数在FMX.Graphics.TBitmapData.GetPixel中 结果我引 ...
- Webpack使用教程六(Plugins)
webpack可以通过插件进行功能扩展.webpack拥有很多的内置插件和第三方插件.下面以webpack自带的插件bannerPlugin为例,说明插件的简单用法.bannerPlugin可以将任何 ...
- nginx+php 安装手册
http://www.cnblogs.com/hxl2009/archive/2013/06/11/3131627.html [mysql安装] php 安装 1: wget http://ftp. ...