deferred rendering case study

59
Deferred Rendering case study : Raiderz & Gunz2

Upload: ozlael-ozlael

Post on 12-Jan-2017

6.211 views

Category:

Documents


5 download

TRANSCRIPT

Deferred Rendering case study

: Raiderz & Gunz2

선임연구원 오지현

ozlael.egloos.com@ozlael

Normal Depth /Specular

Diffuse /Mask

Light Buffer

Merge

Post Effect

Opacity

Additive

G - pass

L - pass

M - pass

Normal Depth /Specular

Diffuse /Mask

Light Buffer

Merge

Post Effect

Opacity

AdditiveGeometry Pass

Usage Format R G B A

Nromal R16FG16F Normal X Normal Y

Depth, Specular

R16FG16F Linear Depth

Specular. Rim

Diffuse, Mask

R8G8B8A8 Diffuse R Diffuse G Diffuse B Mask

G-buffer Normal.XYNormal.Z = sqrt(1 - Normal.X2 - Normal.Y2)

Code: KillZone2

-Z+ZGround

Camera Direction

G-buffer Linear Depth.XDepth's sign = Normal Z's sign

[Sign] Integer . Fractional

G-buffer Depth.Y3 values in 1 channel

Rim : 0,1

Specular Glossiness : 1 ~ 100

Specular Level : 0 ~ 0.99

A : Mask

G-buffer Diffuse.RGB

Decal

Screen Space Decal

vProjcoord = mul( vPos, mxViewToDecal)

Image : Effects Techniques Used in Uncharted 3, GDC12

G-buffer Diffuse.A

Normal Depth /Specular

Diffuse /Mask

Light Buffer

Merge

Post Effect

Opacity

AdditiveLight Pass

Reconstructing Position from depth

for Lighting

G-Depth

Image :killzone2 Code: GPU Gems3

// Get the depth buffer value at this pixel. float zOverW = tex2D(depthTexture, texCoord); // H is the viewport position at this pixel in the range -1 to 1. float4 H = float4(texCoord.x*2-1, (1-texCoord.y)*2-1,zOverW, 1); // Transform by the view-projection inverse. float4 D = mul(H, g_ViewProjectionInverseMatrix); // Divide by w to get the world position. float4 worldPos = D / D.w;

matt pettineo, dawn studio

G-Depth ( 0~1)

vPos = ray * depth;

float3 ray = FarTopRight;ray.xy = lerp(-FarTopRight.xy, FarTopRight.xy, scrUV);float depth = tex2D(DepthBuffer, scrUV);float3 PosInView = ray * depth;

http://blog.daum.net/rockeracer/38

Visualization Tool

Directional Light

Directional Light

Sub LightSub Light

Sub Light

( D + S ) X L vs ( D X L ) + S

Grayscale Specular Level

SSAO

27msGeforce 8800GT 1920x1080HBAO

Only in shadow전체에 AO 적용

그림자영역만 AO 적용

Not for

character케릭터에 AO 적용

케릭터에 AO 미적용

Normal Depth

DiffuseLight Buffer

Merge

Post Effect

Opacity

Additive

Geometry Buffer

Light Buffer

Merge

Post Effect

Opacity

Additive

Material Pass

+=Before After

http://www.mrbluesummers.com

SubSurface Scattering

표면하산란

비싼 남자들

Fake SSSReal-Time Approximations to Subsurface Scattering,- GPUGEMS슈퍼 스트리트 파이터 그래픽스 강좌- 니시가와젠지마비노기 영웅전의 캐릭터 비주얼 시스템- NDC08

+

Before After

Hair lightingHair Rendering and Shading - Scheuermann, GDC 2004RenderMonkey sample

+Before After

Transparency

Light buffer

Geometry Buffer

Light Buffer

Merge

Post Effect

Opacity

Additive

Fast approXimate AAhttp://timothylottes.blogspot.kr

3D VISION with Deferred

Fundamentals of Stereoscopic Imaging - Bernard Mendibru

Automatic !

WRONG !

양안 명시적 렌더( Quad Buffer )

OK !

Thank you ~

illusted by 중원

Special Thanks toMAIET Ent. 임직원 일동

Kasa 멤버 일동게임개발포에버 필진 일동

팟캐스트 게임개발자랩소디팟캐스트 POG결혼추카 학현결혼추카 주행