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
随机推荐
- 近期oepnfire工作总结.
1.优化订阅好友流程,增加验证消息2.优化好友查询模块,实现对扩展字段的查询.如批量匹配通讯录.3.实现webservice接口方式消息推送功能,供其他系统调用.4.实现花名册版本(XEP-237), ...
- 尽量少用if else
Michael Feathers是Object Mentor International公司的技术顾问.他的工作不仅是技术开发,他还参与对世界各地技术团队进行培训.指导等工作.他曾开发了将JUnit迁 ...
- 解决AndroidADT自带Eclipse编辑器不能自动代码提示的问题
今天发现,我下载的AndroidADT开发套装中自带的Eclipse没有自动代码提示功能.通过参考http://blog.csdn.net/coolszy/article/details/724195 ...
- Vi Command 【转载】
原文: http://www.cnblogs.com/Jesenwuzj/archive/2010/03/18/1688776.html Vi中文手册 1.vi的基本概念 基本上vi可以分为三种状态, ...
- MVC过滤器
MVC的每一个请求都会给相应的控制器的对应行为方法处理,那么想在这些处理的前 前后后增加一些额外的逻辑处理,因此过滤器的作用就来了 MVC支持的过滤器类型有四种,分别是:Authorization(授 ...
- Jade之条件语句
条件语句 jade支持js中的if/elseif/else语法. jade: - var user = { description: 'foo bar baz' } - var authorised ...
- linux下如何查找需要的文件后并删除
1.首先查找指定目录下的文件,默认为当前目录 使用命令:find . -name 'a.txt' 会得到当前目录下所有包括子孙目录下的所有后缀为txt的文件 2.查找后删除 使用命令:find . - ...
- C++ map使用(基于hashtable)
C++ map使用(基于hashtable) 实际上基于hashtable的map有两种一种是hash_map,unordered_map,但是最好使用后者,原因如下[1] 因为标准化的推进,unor ...
- UILabel和UIButton
一.UILabel 1.UILabel:标签,主要用来显示文字. 创建步骤: (1)开辟空间并初始化(如果本类有初始化方法,使用自己的,否则,使用负父类的). UILabel *textLabel ...
- 工具武装的前端开发工程师 Mac 软件清单
Awesome Mac 这个仓库主要是收集非常好用的Mac应用程序.软件以及工具,主要面向开发者和设计师.有这个想法是因为我最近发了一篇较为火爆的涨粉儿微信公众号文章<工具武装的前端开发工程 ...