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. 【转载】JAVA多线程和并发基础面试问答

    转载自这里. 多线程和并发问题是Java技术面试中面试官比较喜欢问的问题之一.在这里,从面试的角度列出了大部分重要的问题,但是你仍然应该牢固的掌握Java多线程基础知识来对应日后碰到的问题.(校对注: ...

  2. python mock的简单使用

    参考文章: http://blog.csdn.net/wenph2008/article/details/46862771 内容待填充...

  3. C#使用NOPI生成excel要点记载

    很久没动手写博客了,最近由于公司比较忙,接触了不同类容,对自己的技术和业务理解有了更深入的理解.今天有点小空,将前段时间所运用到的一些知识点记录下来. 由于公司业务需要统计一些数据,所以对于我们来说, ...

  4. mac 远程桌面连接分享

    mac 远程桌面连接分享 8.0版本 https://pan.baidu.com/s/1wgVvAmQreGwYZAhLST764w 10.0版本 https://pan.baidu.com/s/1Y ...

  5. centos7yum安装tomcat

    执行安装命令 [root@localhost ~]# yum -y install tomcat 查询tomcat是否安装成功 [root@localhost ~]# rpm -q tomcat to ...

  6. 四十三 常用内建模块 base64

    Base64是一种用64个字符来表示任意二进制数据的方法. 用记事本打开exe.jpg.pdf这些文件时,我们都会看到一大堆乱码,因为二进制文件包含很多无法显示和打印的字符,所以,如果要让记事本这样的 ...

  7. 使用mongo shell和客户端连接至MongoDB Atlas

    MongoDB Atlas是Mongo官方的一个集群服务,也可以注册并创建一个免费的集群,但DB的大小只有500M,如果数据量不是很大的应用,可以选择该集群方案 需要注意的是,目前我使用的这个集群,服 ...

  8. 在Pygtk和Glade使用Gtkbuilder

    最近开始学习python的GUI,选择了Pygtk,试着用Glade设计界面,项目文件采用Gtkbuilder格式,网上的教程大部分是使用Libglade,所以用xml方式读取.glade文件: wT ...

  9. Python和xml简介

    python提供越来越多的技术来支持xml,本文旨在面向初学利用Python处理xml的读者,以教程的形式介绍一些基本的xml出来概念.前提是读者必须知道一些xml常用术语. 先决条件 本文所有的例子 ...

  10. 一个Bean属性拷贝的工具类

    package com.fpi.spring.qaepb.cps.util; import java.beans.IntrospectionException; import java.beans.P ...