SlideShare a Scribd company logo
1 of 28
Deferred Rendering
최재현
선택 이유
Deferred Rendering
 물체의 표면에 빛이 반사되는 계산(Bidirectional Reflectance
Distribution Function)을 실시간으로(DynamicLight), 효율적으로 처
리해보자.
Lambert = dot(N,L)
Physically Based
일반적인 렌더링 과정.
Game
Loop
Tick
Object.Draw
Object.Draw
Object.Draw
Object.Draw
GraphicLibrary.SetMesh
GraphicLibrary.SetTexture
GraphicLibrary.SetShader
GraphicLibrary.SetWorldMatrix
GraphicLibrary.SetLightObject
….(DataToGPU)
GraphicLibrary.Draw
In Object Drawing~
GraphicLibrary?
DirectX
OpenGL
….
In GPU
일반적인 렌더링 과정.
Bidirectional Reflectance Distribution Function
필요한 변수들
Position
NormalVector
LightVector
LightDirectionVector
LightPosition
ViewVector
DefuseColor
AmbientColor
SpeculerTex
NormalTex
ReflectionMap
……..
각 BRDF모델에 따라 필요한 변수들이 조금씩
혹은 엄청 많이 다르다.
일반적으로 Pixel Shading단계에서 계산을 수행한다.
Forward Renderering Light Calculate
Object.Draw
Object.Draw
Object.Draw
Object.Draw
Frame Buffer
Forward Renderering Light Calculate
Object.Draw
Object.Draw
Object.Draw
Object.Draw
Frame Buffer
Forward Renderering Light Calculate
Object.Draw
Object.Draw
Object.Draw
Object.Draw
….
화면에 그려지는 오브젝트의 픽셀 수(중복포함) * 라이트 개수
= 라이팅 연산 총합
Frame Buffer
쓸모없이 반복되는(?) 라이팅 연산을 줄일
수 없을까? => Defferd Rendering
Forward 렌더링
Game
Loop
Tick
Object.Draw
Object.Draw
Object.Draw
Object.Draw
GraphicLibrary.SetMesh
GraphicLibrary.SetTexture
GraphicLibrary.SetShader
GraphicLibrary.SetWorldMatrix
GraphicLibrary.SetLightObject1
GraphicLibrary.SetLightObject2
GraphicLibrary.SetLightObject3
….(DataToGPU)
GraphicLibrary.Draw
In Object Drawing
In GPU
Defferrd 렌더링
Game
Loop
Tick
Object.Draw
Object.Draw
Object.Draw
Object.Draw
Light1.Draw
Light2.Draw
Light3.Draw
GraphicLibrary.SetMesh
GraphicLibrary.SetTexture
GraphicLibrary.SetShader
GraphicLibrary.SetWorldMatrix
….(DataToGPU)
GraphicLibrary.DrawToG-Buffer
(NeedMultiRenderTarget)
In Object Drawing
In GPU
GraphicLibrary.SetLightData
GraphicLibrary.DrawToFrameBuffer
Defferd Rederering Light Calculate
Object.Draw
Object.Draw
Object.Draw
Object.Draw
Light.Draw
Defferd Rederering Light Calculate
Object.Draw
Object.Draw
Object.Draw
Object.Draw
Light.Draw
Frame Buffer
Defferd Rederering Light Calculate
Object.Draw
Object.Draw
Object.Draw
Object.Draw
….
Light.Draw
화면의 픽셀 수 * 라이트 개수
= 라이팅 연산 총합
Frame Buffer
어떻게 가능한가?
일반적인 렌더링 과정.
Bidirectional Reflectance Distribution Function
필요한 변수들
Position
NormalVector
LightVector
LightDirectionVector
LightPosition
ViewVector
DefuseColor
AmbientColor
SpeculerTex
NormalTex
ReflectionMap
……..
각 BRDF모델에 따라 필요한 변수들이 조금씩
혹은 엄청 많이 다르다.
일반적으로 Pixel Shading단계에서 계산을 수행한다.
라이팅 계산에 필요한 변수들을
미리 텍스쳐에 적어놓는다!
Light 렌더링 과정.
Bidirectional Reflectance Distribution Function
필요한 변수들
LightVector
LightDirectionVector
LightPosition
RT1
RT2
RT3
RT1, RT2, RT3에 적혀있는 정보를 바탕으로
픽셀당 라이팅계산을 수행한다.
Deferred Rendering
이미 1988년 시그래프 논문에서 이 기법이 소개 되었다.
그래픽 카드의 발달로 이젠 실시간에 사용가능!
Deferred Rendering이 가능하려면…
MRT(Multi Render Target)을 기본적으로 4장 이상 사용할 수 있어야
한다.
ShaderModel 3.0이상
Deferred Rendering의 장점.
 많은 수의 동적 라이팅을 효율적으로 처리할 수 있다.
 G-Buffer의 속성을 다른 기법에서 활용할수 있다. (포스트
프로세싱 등)
Deferred Rendering의 단점.
 반투명한 오브젝트의 렌더링이 불가능하다.
 쓸모없이 반복되는(?) 라이팅 연산이 쓸모있어지는 순간..
 MRT -> 메모리증가
 안티엘리어싱이 힘들다. (2D스크린 화면에서의 계산이기때문)
Unity에서 Deferrd Rendering
 안티앨리어싱 X
 반투명 오브젝트 처리 x
 위의 오브젝트들은 forward렌더링방식을 사용하여 렌더링하도록 추천.
 RT0, ARGB32 format: Diffuse color (RGB), unused (A).
 RT1, ARGB32 format: Specular color (RGB), roughness (A).
 RT2, ARGB2101010 format: World space normal (RGB), unused (A).
 RT3, ARGB32 (non-HDR) or ARGBHalf (HDR) format: Emission + lighting +
lightmaps + reflection probes buffer.
 Depth+Stencil buffer.
 http://docs.unity3d.com/kr/current/Manual/RenderTech-
DeferredShading.html 구현 세부사항.
Unity에서 Deferrd Rendering
모바일 모바일은?
MRT를 지원하는 모바일 GPU는 아직까
지 손에 꼽는다…. Orz..
참고자료
 http://www.slideshare.net/agebreak/ndc11-deferred-shading
(알콜코더님의 슬라이드셰어 사실...이것만 보시면되요)
 http://http.download.nvidia.com/developer/presentations/2004/680
0_Leagues/6800_Leagues_Deferred_Shading.pdf
 http://gamedevelopment.tutsplus.com/articles/forward-rendering-
vs-deferred-rendering--gamedev-12342
 http://http.download.nvidia.com/developer/SDK/Individual_Samples
/DEMOS/Direct3D9/DeferredShading.zip (예제 코드)

More Related Content

What's hot

NDC2015 광개토태왕 테크니컬 아트
NDC2015 광개토태왕 테크니컬 아트NDC2015 광개토태왕 테크니컬 아트
NDC2015 광개토태왕 테크니컬 아트재철 황
 
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑MinGeun Park
 
Display color와 Digital texture format의 이해
Display color와 Digital texture format의 이해Display color와 Digital texture format의 이해
Display color와 Digital texture format의 이해SangYun Yi
 
Unite2015 probelight(150417)
Unite2015 probelight(150417)Unite2015 probelight(150417)
Unite2015 probelight(150417)SangYun Yi
 
Devtree lightmapping unity5_2_1stday
Devtree lightmapping unity5_2_1stdayDevtree lightmapping unity5_2_1stday
Devtree lightmapping unity5_2_1stdaySangYun Yi
 
[KGC2014] 울프나이츠 엔진 프로그래밍 기록
[KGC2014] 울프나이츠 엔진 프로그래밍 기록 [KGC2014] 울프나이츠 엔진 프로그래밍 기록
[KGC2014] 울프나이츠 엔진 프로그래밍 기록 JiUng Choi
 
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례SangYun Yi
 
니시카와젠지의 3 d 게임 팬을 위한 ps4
니시카와젠지의 3 d 게임 팬을 위한 ps4니시카와젠지의 3 d 게임 팬을 위한 ps4
니시카와젠지의 3 d 게임 팬을 위한 ps4민웅 이
 
Deferred Shading
Deferred ShadingDeferred Shading
Deferred Shading종빈 오
 
Kgc2013 defense technica_converting_이상윤
Kgc2013 defense technica_converting_이상윤Kgc2013 defense technica_converting_이상윤
Kgc2013 defense technica_converting_이상윤SangYun Yi
 
[9XD] Introduction to Computer Graphics
[9XD] Introduction to Computer Graphics[9XD] Introduction to Computer Graphics
[9XD] Introduction to Computer GraphicsChris Ohk
 
Light in screen_space(Light Pre Pass)
Light in screen_space(Light Pre Pass)Light in screen_space(Light Pre Pass)
Light in screen_space(Light Pre Pass)민웅 이
 
유니티 게임 그래픽스 아트 개발 사례 분석
유니티 게임 그래픽스 아트 개발 사례 분석유니티 게임 그래픽스 아트 개발 사례 분석
유니티 게임 그래픽스 아트 개발 사례 분석SangYun Yi
 
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근MinGeun Park
 
Unity cookbook 17
Unity cookbook 17Unity cookbook 17
Unity cookbook 17Jihun Soh
 
게임 개발을 위한 렌더링 기법 한성환
게임 개발을 위한 렌더링 기법   한성환게임 개발을 위한 렌더링 기법   한성환
게임 개발을 위한 렌더링 기법 한성환Yggdrasil610
 
Unity3D로 풀3D web mmorpg 만들기
Unity3D로 풀3D web mmorpg 만들기Unity3D로 풀3D web mmorpg 만들기
Unity3D로 풀3D web mmorpg 만들기JP Jung
 

What's hot (20)

NDC2015 광개토태왕 테크니컬 아트
NDC2015 광개토태왕 테크니컬 아트NDC2015 광개토태왕 테크니컬 아트
NDC2015 광개토태왕 테크니컬 아트
 
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
 
Display color와 Digital texture format의 이해
Display color와 Digital texture format의 이해Display color와 Digital texture format의 이해
Display color와 Digital texture format의 이해
 
Devtree illu
Devtree illuDevtree illu
Devtree illu
 
Unite2015 probelight(150417)
Unite2015 probelight(150417)Unite2015 probelight(150417)
Unite2015 probelight(150417)
 
Devtree lightmapping unity5_2_1stday
Devtree lightmapping unity5_2_1stdayDevtree lightmapping unity5_2_1stday
Devtree lightmapping unity5_2_1stday
 
[KGC2014] 울프나이츠 엔진 프로그래밍 기록
[KGC2014] 울프나이츠 엔진 프로그래밍 기록 [KGC2014] 울프나이츠 엔진 프로그래밍 기록
[KGC2014] 울프나이츠 엔진 프로그래밍 기록
 
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
 
니시카와젠지의 3 d 게임 팬을 위한 ps4
니시카와젠지의 3 d 게임 팬을 위한 ps4니시카와젠지의 3 d 게임 팬을 위한 ps4
니시카와젠지의 3 d 게임 팬을 위한 ps4
 
Deferred Shading
Deferred ShadingDeferred Shading
Deferred Shading
 
Kgc2013 defense technica_converting_이상윤
Kgc2013 defense technica_converting_이상윤Kgc2013 defense technica_converting_이상윤
Kgc2013 defense technica_converting_이상윤
 
Motion blur
Motion blurMotion blur
Motion blur
 
[9XD] Introduction to Computer Graphics
[9XD] Introduction to Computer Graphics[9XD] Introduction to Computer Graphics
[9XD] Introduction to Computer Graphics
 
Light in screen_space(Light Pre Pass)
Light in screen_space(Light Pre Pass)Light in screen_space(Light Pre Pass)
Light in screen_space(Light Pre Pass)
 
Ssao
SsaoSsao
Ssao
 
유니티 게임 그래픽스 아트 개발 사례 분석
유니티 게임 그래픽스 아트 개발 사례 분석유니티 게임 그래픽스 아트 개발 사례 분석
유니티 게임 그래픽스 아트 개발 사례 분석
 
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
 
Unity cookbook 17
Unity cookbook 17Unity cookbook 17
Unity cookbook 17
 
게임 개발을 위한 렌더링 기법 한성환
게임 개발을 위한 렌더링 기법   한성환게임 개발을 위한 렌더링 기법   한성환
게임 개발을 위한 렌더링 기법 한성환
 
Unity3D로 풀3D web mmorpg 만들기
Unity3D로 풀3D web mmorpg 만들기Unity3D로 풀3D web mmorpg 만들기
Unity3D로 풀3D web mmorpg 만들기
 

Similar to 2015.12.10 defferd renderring_

Tips and experience of DX12 Engine development .
Tips and experience of DX12 Engine development .Tips and experience of DX12 Engine development .
Tips and experience of DX12 Engine development .YEONG-CHEON YOU
 
실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬현찬 양
 
구세대 엔진 신데렐라 만들기 최종본 유트브2
구세대 엔진 신데렐라 만들기 최종본 유트브2구세대 엔진 신데렐라 만들기 최종본 유트브2
구세대 엔진 신데렐라 만들기 최종본 유트브2Kyoung Seok(경석) Ko(고)
 
Direct3d overview
Direct3d overviewDirect3d overview
Direct3d overview문익 장
 
SGL : 소프트웨어 3D 렌더링 엔진
SGL : 소프트웨어 3D 렌더링 엔진SGL : 소프트웨어 3D 렌더링 엔진
SGL : 소프트웨어 3D 렌더링 엔진SUNGCHEOL KIM
 
Tips and experience_of_dx12_engine_development._ver_1.2
Tips and experience_of_dx12_engine_development._ver_1.2Tips and experience_of_dx12_engine_development._ver_1.2
Tips and experience_of_dx12_engine_development._ver_1.2YEONG-CHEON YOU
 
[박민근] 3 d렌더링 옵티마이징_2
[박민근] 3 d렌더링 옵티마이징_2[박민근] 3 d렌더링 옵티마이징_2
[박민근] 3 d렌더링 옵티마이징_2MinGeun Park
 
멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)Bongseok Cho
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019devCAT Studio, NEXON
 
[0602 박민근] direct2 d
[0602 박민근] direct2 d[0602 박민근] direct2 d
[0602 박민근] direct2 dMinGeun Park
 
Direct x 11 입문
Direct x 11 입문Direct x 11 입문
Direct x 11 입문Jin Woo Lee
 
[0312 조진현] good bye dx9
[0312 조진현] good bye dx9[0312 조진현] good bye dx9
[0312 조진현] good bye dx9진현 조
 
20140514 team blender_v01 (Korean)
20140514 team blender_v01 (Korean)20140514 team blender_v01 (Korean)
20140514 team blender_v01 (Korean)Dongho Kim
 
Introduction to DirectX 12 Programming , Ver 1.5
Introduction to DirectX 12 Programming , Ver 1.5Introduction to DirectX 12 Programming , Ver 1.5
Introduction to DirectX 12 Programming , Ver 1.5YEONG-CHEON YOU
 
Graph convolutional matrix completion
Graph convolutional  matrix completionGraph convolutional  matrix completion
Graph convolutional matrix completionpko89403
 
파이어몽키 3D 애플리케이션 만들기
파이어몽키 3D 애플리케이션 만들기파이어몽키 3D 애플리케이션 만들기
파이어몽키 3D 애플리케이션 만들기Devgear
 
KGC 2007 소프트웨어 렌더러 개발
KGC 2007  소프트웨어 렌더러 개발KGC 2007  소프트웨어 렌더러 개발
KGC 2007 소프트웨어 렌더러 개발SeongWan Kim
 
프론트엔드 개발자를 위한 Layer Model
프론트엔드 개발자를 위한 Layer Model프론트엔드 개발자를 위한 Layer Model
프론트엔드 개발자를 위한 Layer ModelHan Lee
 

Similar to 2015.12.10 defferd renderring_ (20)

Tips and experience of DX12 Engine development .
Tips and experience of DX12 Engine development .Tips and experience of DX12 Engine development .
Tips and experience of DX12 Engine development .
 
실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬
 
구세대 엔진 신데렐라 만들기 최종본 유트브2
구세대 엔진 신데렐라 만들기 최종본 유트브2구세대 엔진 신데렐라 만들기 최종본 유트브2
구세대 엔진 신데렐라 만들기 최종본 유트브2
 
Direct3d overview
Direct3d overviewDirect3d overview
Direct3d overview
 
SGL : 소프트웨어 3D 렌더링 엔진
SGL : 소프트웨어 3D 렌더링 엔진SGL : 소프트웨어 3D 렌더링 엔진
SGL : 소프트웨어 3D 렌더링 엔진
 
Tips and experience_of_dx12_engine_development._ver_1.2
Tips and experience_of_dx12_engine_development._ver_1.2Tips and experience_of_dx12_engine_development._ver_1.2
Tips and experience_of_dx12_engine_development._ver_1.2
 
[박민근] 3 d렌더링 옵티마이징_2
[박민근] 3 d렌더링 옵티마이징_2[박민근] 3 d렌더링 옵티마이징_2
[박민근] 3 d렌더링 옵티마이징_2
 
멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
 
[0602 박민근] direct2 d
[0602 박민근] direct2 d[0602 박민근] direct2 d
[0602 박민근] direct2 d
 
Color Control
Color ControlColor Control
Color Control
 
Direct x 11 입문
Direct x 11 입문Direct x 11 입문
Direct x 11 입문
 
[0312 조진현] good bye dx9
[0312 조진현] good bye dx9[0312 조진현] good bye dx9
[0312 조진현] good bye dx9
 
20140514 team blender_v01 (Korean)
20140514 team blender_v01 (Korean)20140514 team blender_v01 (Korean)
20140514 team blender_v01 (Korean)
 
Introduction to DirectX 12 Programming , Ver 1.5
Introduction to DirectX 12 Programming , Ver 1.5Introduction to DirectX 12 Programming , Ver 1.5
Introduction to DirectX 12 Programming , Ver 1.5
 
Graph convolutional matrix completion
Graph convolutional  matrix completionGraph convolutional  matrix completion
Graph convolutional matrix completion
 
파이어몽키 3D 애플리케이션 만들기
파이어몽키 3D 애플리케이션 만들기파이어몽키 3D 애플리케이션 만들기
파이어몽키 3D 애플리케이션 만들기
 
Butter android views
Butter android viewsButter android views
Butter android views
 
KGC 2007 소프트웨어 렌더러 개발
KGC 2007  소프트웨어 렌더러 개발KGC 2007  소프트웨어 렌더러 개발
KGC 2007 소프트웨어 렌더러 개발
 
프론트엔드 개발자를 위한 Layer Model
프론트엔드 개발자를 위한 Layer Model프론트엔드 개발자를 위한 Layer Model
프론트엔드 개발자를 위한 Layer Model
 

2015.12.10 defferd renderring_