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的更多相关文章

  1. Deferred Rendering(三)反锯齿和半透明问题

    Deferred 框架下的AA 前面说过Deferred 框架下无法使用硬件AA.这句话不严谨: Deferred Shading在G-Buffer之后,物体几何信息全被抛弃了,导致兴许每一个像素都独 ...

  2. Tutorial - Deferred Rendering Shadow Mapping 转

    http://www.codinglabs.net/tutorial_opengl_deferred_rendering_shadow_mapping.aspx Tutorial - Deferred ...

  3. Tile-Based Deferred Rendering

    目前所有的移动设备都使用的是 Tile-Based Deferred Rendering(TBDR) 的渲染架构.TBDR 的基本流程是这样的,当提交渲染命令的时候,GPU 不会立刻进行渲染,而是一帧 ...

  4. Forward Rendering VS Deferred Rendering

    http://gad.qq.com/article/detail/32731 Forward Rendering Deferred Rendering

  5. [ZZ] Deferred Rendering and HDR

    http://www.gamedev.net/topic/496785-deferred-rendering-and-hdr/ Quote: Original post by jstrohYeah I ...

  6. Tile based Rendering 二 tbr and tbdr 优化建议tiled based deferred rendering

    http://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-TileBasedArchitectures.pdf tbr 和tbdr ...

  7. Deferred Rendering(二)G-Buffer的组织

    先来看一张网上广为流传的<杀戮地带2>典型的Deferred Shading的G-Buffer组织: 这里补充解释下几个点: 不存Position,而由depth和屏幕像素坐标反推出来.參 ...

  8. Unity5 的新旧延迟渲染Deferred Lighting Rendering Path

    unity5 的render path ,比4的区别就是使用的新的deferred rendering,之前的4的deferred rendering(其实是light prepass)也被保留了下来 ...

  9. 渲染路径-Unity5 的新旧推迟渲染Deferred Lighting Rendering Path

    Unity5 的新旧延迟渲染Deferred Lighting Rendering Path unity5 的render path ,比4的区别就是使用的新的deferred rendering,之 ...

随机推荐

  1. Flash中的注册点和中心点

    用一句话概括注册点和中心点的作用,那就是:注册点用来定位,中心点用来变形 当然,这句话不是非常准确,只是暂时先这么理解,下面会详细讲解. 认识注册点 每个元件都有一个注册点.在元件编辑窗口.或在舞台中 ...

  2. 为什么很多国内公司不使用 jQuery 等开源 JS 框架(库),而选择自己开发 JavaScript 框架?

    http://www.zhihu.com/question/20099586/answer/13971670 我对公司JAVASCRIPT框架的定位思考:

  3. sql中where和having的区别

    “Where” 是一个约束声明,使用Where来约束来自数据库的数据,Where是在结果返回之前起作用的,且Where中不能使用聚合函数. “Having”是一个过滤声明,是在查询返回结果集以后对查询 ...

  4. 洛谷P1514 引水入城 [搜索,区间DP]

    题目传送门 引水入城 题目描述 在一个遥远的国度,一侧是风景秀美的湖泊,另一侧则是漫无边际的沙漠.该国的行政区划十分特殊,刚好构成一个 N 行×M 列的矩形,如上图所示,其中每个格子都代表一座城市,每 ...

  5. 洛谷P1886滑动窗口

    题目传送门 理解题意:给定一个数列和窗口范围k,求依次向右移动窗口时每次窗口内的最大和最小值. 没什么思维难度,一边扫过去,用两个数组maxx和minn记录每个窗口内的最大最小值,移动过程中用两个变量 ...

  6. Java面向对象和特征

    面向对象: 概念: 面向对象是一种程序设计思想,计算机程序的设计实质上就是将现实中的一些事物的特征抽离出来描述成一些计算机事件的过程,这种抽象的过程中,我们把具体的事物封装成一个一个的整体进行描述,使 ...

  7. 如何使用Web字体?

    如何使用Web字体 嵌入Web字体的关键是@font-face规则,通过它可以指定浏览器下载web字体的地址,以及如何在样式表中引用该字体 @font-face { font-family: Voll ...

  8. 【POJ 2154】 Color (置换、burnside引理)

    Color Description Beads of N colors are connected together into a circular necklace of N beads (N< ...

  9. 【BZOJ 2212】【POI 2011】Tree Rotations

    http://www.lydsy.com/JudgeOnline/problem.php?id=2212 自下而上贪心. 需要用权值线段树来记录一个权值区间内的出现次数. 合并线段树时统计逆序对的信息 ...

  10. 【高斯消元】CDOJ1784 曜酱的线性代数课堂(二)

    高斯消元求矩阵秩板子. #include<cstdio> #include<cmath> #include<algorithm> #include<cstri ...