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,之 ...
随机推荐
- windows查看指定端口
- bzoj 3295 CDQ求动态逆序对
#include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk mak ...
- HDU 4348.To the moon SPOJ - TTM To the moon -可持久化线段树(带修改在线区间更新(增减)、区间求和、查询历史版本、回退到历史版本、延时标记不下放(空间优化))
To the moon Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total ...
- 腾讯QQ的聊天记录中的图片记录造假
前不久和朋友在群里聊天时,突然出现了一个BUG,就是一个群友发了A图片,但在我这边显示得却是B图片.当时就猜测,腾讯为了节省流量或者手机资源的原因,给每一张图片弄了个唯一ID,遇到相同ID的就直接从本 ...
- 【SQL】oralce中使用group by和case when按照条件求和
假设我们有一个Salary 薪水表.这个表的字段分别为:id, name, salary, level 在这个表中,每个人有不同的级别(level).我们要根据不同的级别统计相同级别员工的薪水总和. ...
- Vue 2.0 Application Sample
===搭建Demo=== http://blog.csdn.net/wangjiaohome/article/details/51728217 ===单页Application=== http://b ...
- NGUI EventDelagate事件委托
using System.Collections; using System.Collections.Generic; using UnityEngine; public class BUttonCl ...
- oracle return code 2112
SQL-02112 SELECT..INTO returns too many rows Cause: A SELECT...INTO statement returned more rows tha ...
- [Luogu1979][NOIP2013]华容道(BFS+SPFA)
考虑从起点到终点的过程,一定是先将空格子移到指定格子旁边,和指定格子交换,再移到下一个指定格子要到的地方,再交换,如此反复. 于是问题分为两个部分: 1.给定两个曼哈顿距离为2的格子求最短路,BFS即 ...
- 【点分治】Osipovsky Cup 2014 Kovrov, Sunday, December 21, 2014 Problem A. Attack and Defence
题意:给你一棵树,每个点有一个左括号或者右括号,问你树上能够完美匹配的路径数量(l->r,r->l 视作不同路径). 点分治可以使用“不扣去重复答案”的写法,只不过,要先将每个点的子树按照 ...