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,之 ...
随机推荐
- css文件放在头部的原因
我在博问上发的一个这个问题 然后有人这样回复我的 我感觉很有道理的样子 所以我放上来了 这样会先加载css的样式,在渲染dom的时候已经知道了自己的样式了,所以一次渲染成功 如果css放在底部,那么需 ...
- OpenCL与CUDA,CPU与GPU
OpenCL OpenCL(全称Open Computing Language,开放运算语言)是第一个面向异构系统通用目的并行编程的开放式.免费标准,也是一个统一的编程环境,便于软件开发人员为高性能计 ...
- 【转载】Web开发技术发展历史-版本1
原文在这里. Web开发技术发展历史 Web的诞生 提到Web,不得不提一个词就是“互联网”.Web是World Wide Web的简称,中文译为万维网.“万维网”和我们经常说的“互联网”是两个联系极 ...
- Go语言用mock server模拟调用(httptest)
mock是个好东东, 在大项目或大公司,很实用, 因为很多环境不是随时在开发环境可得的. package main import ( "testing" "net/htt ...
- Laravel 下配置 Redis 让缓存、Session 各自使用不同的 Redis 数据库
为什么要这样做? 默认情况下,Redis 服务会提供 16 个数据库,Laravel 使用数据库 0 (请见 Redis 文档)作为缓存和 Session 的存储. 在使用的过程中觉得这个默认的设置挺 ...
- (1)go 环境搭建
1 .下载安装 https://golang.org/ 2.环境变量配置 安装后会自动配置三个环境变量 (1) GOROOT: (2) PATH: (3) GOPATH GOPATH 从1.8开始,w ...
- oracle return code 2112
SQL-02112 SELECT..INTO returns too many rows Cause: A SELECT...INTO statement returned more rows tha ...
- matlab学习之降噪平滑算法
平滑降噪测试,代码如下 % 平滑降噪 % FFT变换和小波变换 clc clf clear length_of_sig=128; x=linspace(0,2*pi,length_of_sig); % ...
- Spring的Web服务
Spring支持:使用JAX-RPC暴露服务,访问Web服务 除了上面所说的支持方法,你还可以用XFire xfire.codehaus.org 来暴露你的服务.XFire是一个轻量级的SOAP库,目 ...
- 【UOJ #79】一般图最大匹配 带花树模板
http://uoj.ac/problem/79 带花树模板,做法详见cyb的论文或fhq的博客. 带花树每次对一个未盖点bfs增广,遇到奇环就用并查集缩环变成花(一个点),同时记录每个点的Next( ...