deferred rendering with msaa
https://docs.nvidia.com/gameworks/content/gameworkslibrary/graphicssamples/d3d_samples/antialiaseddeferredrendering.htm
https://github.com/NVIDIAGameWorks/D3DSamples/tree/master/samples/DeferredShadingMSAA
{
float3 worldNormal = normalize(pixel.worldNorm);
float viewDepth = pixel.viewDepth / 1000.0f;
float3 diffuse = bTextured > 0 ? texDiffuse.Sample(textureSampler, float2(1, 1) - pixel.uv).rgb : DiffuseColor;
float edge = coverage != 0xf;
result.fragment1 = float4(worldNormal, viewDepth);
result.fragment2 = float4(diffuse, edge);
result.fragment3 = coverage;
}
coverage这个方法我倒是看懂了 缺点是 mesh的边缘都会被标记 实际上这里可能不需要超采样
这是另外一个方法判断 normal detph的连续性
if(UseDiscontinuity == )
{
float4 gBuf1 = texGBufferMS1.Load(pixel.pos.xy, );
float4 gBuf2 = texGBufferMS2.Load(pixel.pos.xy, ); float3 normal = gBuf1.xyz;
float depth = gBuf1.w;
float3 albedo = gBuf2.xyz; [unroll]
for(int i = ; i < SAMPLE_COUNT; i++)
{
float4 nextGBuf1 = texGBufferMS1.Load(pixel.pos.xy, i);
float4 nextGBuf2 = texGBufferMS2.Load(pixel.pos.xy, i); float3 nextNormal = nextGBuf1.xyz;
float nextDepth = nextGBuf1.w;
float3 nextAlbedo = nextGBuf2.xyz; [branch]
if(abs(depth - nextDepth) > 0.1f || abs(dot(abs(normal - nextNormal), float3(, , ))) > 0.1f || abs(dot(albedo - nextAlbedo, float3(, , ))) > 0.1f)
{
clip(-0.5f);
return ;
}
}
}
一看就巨费 depth normal albedo大于某阈值就标记为complex pixle
用上述两种结果做光照
gbuffer 用msaa生成
但我总觉得我在哪还见过一篇 msaa+deferred的解决方案
msaa 的srv 用mstex.load(uv,sampleID) 放循环里
deferred rendering with msaa的更多相关文章
- Deferred Rendering(三)反锯齿和半透明问题
Deferred 框架下的AA 前面说过Deferred 框架下无法使用硬件AA.这句话不严谨: Deferred Shading在G-Buffer之后,物体几何信息全被抛弃了,导致兴许每一个像素都独 ...
- Tutorial - Deferred Rendering Shadow Mapping 转
http://www.codinglabs.net/tutorial_opengl_deferred_rendering_shadow_mapping.aspx Tutorial - Deferred ...
- Tile-Based Deferred Rendering
目前所有的移动设备都使用的是 Tile-Based Deferred Rendering(TBDR) 的渲染架构.TBDR 的基本流程是这样的,当提交渲染命令的时候,GPU 不会立刻进行渲染,而是一帧 ...
- Forward Rendering VS Deferred Rendering
http://gad.qq.com/article/detail/32731 Forward Rendering Deferred Rendering
- [ZZ] Deferred Rendering and HDR
http://www.gamedev.net/topic/496785-deferred-rendering-and-hdr/ Quote: Original post by jstrohYeah I ...
- Tile based Rendering 二 tbr and tbdr 优化建议tiled based deferred rendering
http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-TileBasedArchitectures.pdf tbr 和tbdr ...
- Deferred Rendering(二)G-Buffer的组织
先来看一张网上广为流传的<杀戮地带2>典型的Deferred Shading的G-Buffer组织: 这里补充解释下几个点: 不存Position,而由depth和屏幕像素坐标反推出来.參 ...
- Unity5 的新旧延迟渲染Deferred Lighting Rendering Path
unity5 的render path ,比4的区别就是使用的新的deferred rendering,之前的4的deferred rendering(其实是light prepass)也被保留了下来 ...
- 渲染路径-Unity5 的新旧推迟渲染Deferred Lighting Rendering Path
Unity5 的新旧延迟渲染Deferred Lighting Rendering Path unity5 的render path ,比4的区别就是使用的新的deferred rendering,之 ...
随机推荐
- O(n)回文子串(Manacher)算法
O(n)回文子串(Manacher)算法 资料来源网络 参见:http://www.felix021.com/blog/read.php?2040 问题描述: 输入一个字符串,求出其中最大的回文子串. ...
- inline-block,vertical-align:middle
现在inline-block貌似可以替代float来实现多个item的排列分布吧 div是块级元素,如果不设置他的明确的宽度,那他就等于父元素的宽度,如果想让他其它随着子元素的变化而变化,需要改变他的 ...
- BZOJ 1901: Zju2112 Dynamic Rankings 区间k大 带修改 在线 线段树套平衡树
之前写线段树套splay数组版..写了6.2k..然后弃疗了.现在发现还是很水的..嘎嘎.. zju过不了,超时. upd:才发现zju是多组数据..TLE一版才发现.然后改了,MLE...手写内存池 ...
- react native redux saga增加日志功能
redux-logger地址:https://github.com/evgenyrodionov/redux-logger 目前Reac native项目中已经使用redux功能,异步中间件使用red ...
- nodejs安装sharp出错的问题
PS D:\report\source\lpd-planning-allocation> yarn yarn install v1.3.2 [/] Resolving packages... [ ...
- vue-music 关于Search(搜索页面)-- 搜索结果优化
搜索结果 列表点击跳转到相应的歌手详情页或者 歌曲页面,通过子路由跳转,和singer 组件一样 在suggest.vue 组件判断如果点击的是歌手,则new 一个歌手对象,通过这个对象的id 属性值 ...
- 2015 ACM-ICPC 沈阳站
题目链接 2015 ACM-ICPC Shenyang Problem A Problem B Problem C Problem D 签到题,所有gcd的倍数都可以被写出来. 那么判断一下这类数的 ...
- Python开发基础-Day10生成器表达式形式、面向过程编程、内置函数部分
生成器表达式形式 直接上代码 # yield的表达式形式 def foo(): print('starting') while True: x=yield #默认返回为空,实际上为x=yield No ...
- 【BZOJ 3175】 3175: [Tjoi2013]攻击装置(二分图匹配)
3175: [Tjoi2013]攻击装置 Description 给定一个01矩阵,其中你可以在0的位置放置攻击装置.每一个攻击装置(x,y)都可以按照“日”字攻击其周围的 8个位置(x-1,y-2) ...
- POJ 1740 A New Stone Game 又是博弈论配对找规律orz 博弈论 规律
http://poj.org/problem?id=1740 这个博弈一眼看上去很厉害很高大上让人情不自禁觉得自己不会写,结果又是找规律…… 博弈一般后手胜都比较麻烦,但是主要就是找和先手的对应关系, ...