screen space reflection/soft alpha test/
http://www.crytek.com/cryengine/presentations/secrets-of-cryengine-3-graphics-technology
很多宝贝里面
不止题目那俩
soft alpha test不用msaa的话用后处理
screen space reflection用 ray tracing
*******************************************
screen space reflection /real time local reflection
1.为每个像素计算反射vector(deferred depth and normal)这里需要normal
2.ray march along reflect vector(拿depth01)
3.depth01与sample depth检测
4.if hit sample last frame color
看起来合适deferred shading
********************************************
screen space selt-shadow
soft shadow
contact shadow
======================
skin
http://www.iryoku.com/stare-into-the-future
====================================
pass 0
pass 1
pass 2
blur几次 接着
pass3 composition
http://casual-effects.blogspot.com/2014/08/screen-space-ray-tracing.html
算法描述
pass0
1.计算每个pixel的reflect vector用wold normal(view关于normal的reflect)
2.沿reflect vector ray march,设step=n
3.在step那里 sample depth tex得到depthS
在step那里可以算得 reflect方向上此点depth01
4.if depth01<depthS continue;继续迭代
5.if depth01>depthS hit,此点被场景遮挡 形成反射
return 此点的data---uv pos iterator count hit
-----------------
下面有些问题 步长该如何确定,一共多少step
A:步长小会更精确 大会fast 取个合适的值 有个最大距离限制和最大迭代次数限制 合理设置一下 可见的反射距离
jitter为什么加进来
A:
分层抽样stratified sampling 积分收敛和视觉效果优于均匀采样
---------
错的地方 fade out
屏幕外面的pix在屏幕内部发生反射的那部分图像不存在 用fade out掩饰下
-----------------------
ray marching
sphere marching for sdf 每个黑点那里存了distance to surface
cone tracing
cone 就是这个cone
==============
http://casual-effects.blogspot.com/2014/08/screen-space-ray-tracing.html
代码
github postprocessing stack v2
https://github.com/Unity-Technologies/PostProcessing
使用manual
https://docs.unity3d.com/Manual/PostProcessing-ScreenSpaceReflection.html
===============================================================
这张算法图说的很详细了 和我理解的是一致的
https://gizmosandgames.com/2017/01/17/screen-space-reflections/
算uv reflection上step那次的uv
// Center of ray through pixel
t2 = min(tMax.x, tMax.y);
average = refl_dir * (t1 + t2) * 0.5f;
t1 = t2; // Calculating the eye vector for the current pixel
float u = (pos.x + 0.5f + average.x) / width - 0.5f;
float v = (pos.y + 0.5f + average.y) / height - 0.5f;
cam_ray_dir = float3(u, v * aspect, -ratio); // Compare ray depth to world depth and end if ray has gone behind image
depth_travelled = intersection(starting_world_pos, float3(0,0,0), refl_dir, cam_ray_dir);
ray_depth = starting_world_pos.z + depth_travelled * refl_dir.z;
if (!src.bounds.inside(pixel_x, pixel_y) || ray_depth <= world_pos(pixel_x, pixel_y, 2))
break;
=========================
http://roar11.com/2015/07/screen-space-glossy-reflections/
screen space reflection/soft alpha test/的更多相关文章
- 在Unity中实现屏幕空间反射Screen Space Reflection(4)
第四部分讲一下如何在2D屏幕空间步进光线. http://casual-effects.blogspot.com/2014/08/screen-space-ray-tracing.html 中的代码感 ...
- 在Unity中实现屏幕空间反射Screen Space Reflection(2)
traceRay函数 在上一篇中,我们有如下签名的traceRay函数 bool traceRay(float3 start, float3 direction, out float2 hitPixe ...
- 在Unity中实现屏幕空间反射Screen Space Reflection(1)
本篇文章我会介绍一下我自己在Unity中实现的SSR效果 出发点是理解SSR效果的原理,因此最终效果不是非常完美的(代码都是够用就行),但是从学习的角度来说足以学习到SSR中的核心算法. 如果对核心算 ...
- 高级屏幕空间反射: Screen Space Reflection (SSSR)
SSSR进一步调优,对标寒霜级技术水平,实现方式为Direct3D 11+自主实现实时渲染引擎,方法为对比测试.实现已经有段时间了,还是简要更新下吧.以下画面中的SSSR效果全部采用1:4 resol ...
- 高级屏幕空间反射: Screen Space Reflection (SSR)
自从CE3首倡SSR以来,发展至今,其质量与当年早已不能同日而语.不仅强调超越性的质量,而且强调超越性的性能.乘着周末有空撸了撸,以下是增强型实时SSR结果图.与我原来的SSR原始实现相比,新的增强型 ...
- 在Unity中实现屏幕空间反射Screen Space Reflection(3)
本篇讲一下相交检测的优化.有两个措施. 线段相交检测 之前的检测都是检测光线的终点是否在物体内.我们可以尝试检测光线的线段是否与物体相交. 比如说有一个非常薄的物体,光线差不多垂直于它的表面.如果用普 ...
- GraphicsLab Project 之 Screen Space Planar Reflection
作者:i_dovelemon 日期:2020-06-23 主题:Screen Space Planar Reflection, Compute Shader 引言 前段时间,同事发来一篇讲述特化版本的 ...
- 基于屏幕空间的实时全局光照(Real-time Global Illumination Based On Screen Space)
目录 Reflective Shadow Maps(RSM) RSM 的重要性采样 RSM 的应用与缺陷 Screen Space Ambient Occulsion(SSAO) SSAO Blur ...
- screen space shadowmap unity
unity用到了screen space shadow map 1.camera 在light pos 生成depth1 2.screen space depth2 3.根据depth1 depth2 ...
随机推荐
- classpath中怎样一次性加入整个目录的jar文件
linux可以通过shell来处理 1 2 3 for jar in $HOME/lib/*.jar; do CLASSPATH=$CLASSPATH:$jar done
- MITx 创业101 寻找你的顾客
来自MITx的创业课 步骤一 市场分割(Market Segmentation) 头脑风暴所有可能的市场,关注可能性 寻找最终用户(End User)——会使用你的产品的用户,但不一定会付钱 思考产品 ...
- ImportError: No module named etree.ElementTree
ImportError: No module named etree.ElementTree 排查N久,才发现是因为文件名是xml.py的缘故,文件名一定不要用关键词.....
- 【剑指offer】面试题 16. 数值的整数次方
面试题 16. 数值的整数次方 题目描述 题目:给定一个double类型的浮点数base和int类型的整数exponent.求base的exponent次方. 解答过程 下面的讨论中 x 代表 bas ...
- BotBuilder Nodejs示例查看
关于Bot Framework知识,可以参考<Nodejs Bot学习> 本文是根据bot framework官方示例<https://github.com/Microsoft/Bo ...
- 洛谷P3258松鼠的新家
题目传送门 恩,很明显的一个树剖题,配合树上差分其实也并不难,不过无奈蒟蒻树剖还没那么熟练,而且树上差分也做的少,所以这题愣是做了一中午......唉,果然我还是太菜了.恩,具体做法在代码中解释吧: ...
- 洛谷——P1744 采购特价商品
P1744 采购特价商品 题目背景 <爱与愁的故事第三弹·shopping>第一章. 题目描述 中山路店山店海,成了购物狂爱与愁大神的“不归之路”.中山路上有n(n<=100)家店, ...
- RabbitMQ (十) 远程过程调用(RPC)
在远程计算机上运行一个函数并等待结果,我们通常叫这种模式为远程过程调用或者RPC. 通过 RabbitMQ 进行 RPC 很容易,客户端发送请求消息,服务器回复响应消息.为了接收响应,我们需要发送带有 ...
- 【UOJ #179】线性规划 单纯形模板
http://uoj.ac/problem/179 终于写出来了单纯性算法的板子,抄的网上大爷的qwq 辅助线性规划找非基变量时要加个随机化才能A,我也不知道为什么,卡精度吗? 2017-3-6UPD ...
- JDBC 编程工具包
工具包结构 工具包代码 BeanCountHander.java import java.sql.ResultSet; public class BeanCountHander implements ...