Upload
yong-gyun-im
View
2.714
Download
8
Embed Size (px)
Citation preview
Inferred Lighting:Fast Dynamic lighting and shadows for opaque and translucent objects
original paper by Scott Kircher, Alan Lawrance
http://cafe.naver.com/shader
임용균 ([email protected])
Forward Rendering
•많은 동적 라이팅 (dynamic lighting)•라이트가 많아질 수록 성능이 급격히 낮아짐•다양한 재질 (material)•알파 오브젝트의 라이팅과 그림자•하드웨어 MSAA
Deferred Shading• Geometry Pass
▫ 조명 계산에 필요한 속성들 (Color, Depth, Normal, Specular)을 프레임 버퍼와 동일한 크기의 텍스쳐 (G-Buffer) 에 렌더링
• Light Pass▫ 각각의 조명에 대해 영향 받는 픽셀들을 라이팅하여 프레임 버퍼에
누적 실제로 보이는 픽셀만 라이팅
Deferred Shading
Deferred Shading
•많은 동적 라이팅 (dynamic lighting)•높은 성능•다양한 재질 (material) 표현이 어려움•알파 오브젝트의 라이팅과 그림자•하드웨어 MSAA 지원을 받지 못함 *
Light Pre-Pass Rendering• Geometry Pass
▫ 조명 계산에 필요한 속성들 (Depth, Normal) 을 최소화하여 프레임 버퍼와 동일한 크기의 텍스쳐 (G-Buffer) 에 렌더링
Light Pre-Pass Rendering• Light Pass
▫ 각각의 조명에 대해 영향 받는 픽셀들을 라이팅하여 프레임 버퍼와 동일한 크기의 텍스쳐 (L-Buffer) 에 렌더링
Light Pre-Pass Rendering• Material Pass
▫ 프레임 버퍼에 Forward Rendering 을 하면서 L-Buffer 의 결과를 참조하여 L-Buffer * Material 로 최종 color 값을 계산한다 .
Light Pre-Pass Rendering
•많은 동적 라이팅 (dynamic lighting)•높은 성능 *•다양한 재질 (material)•알파 오브젝트의 라이팅과 그림자•하드웨어 MSAA*
Inferred Lighting
•많은 동적 라이팅 (dynamic lighting)•높은 성능•다양한 재질 (material)•알파 오브젝트의 라이팅과 그림자•하드웨어 MSAA
Main Idea• 저해상도 / 고해상도 (mixed) 버퍼를 사용
▫Geometry Pass G-Buffer 를 Back Buffer 보다 작은 사이즈로 렌더링
▫Light Pass G-Buffer 를 이용하여 라이팅 결과를 L-Buffer 에 렌더링
▫Material Pass Scene 을 Forward Rendering 하면서 L-Buffer 의
결과에 Material 을 적용한다 . (Up Sampling)
• DSF(Discontinuity Sensitive Filtering) 를 이용해 저해상도 -> 고해상도로 up-sampling
Inferred Lighting
Geometry Pass: 800x450
Light Pass: 800x450Material Pass: 1280x720, 8x MSAA
DSF (Discontinuity Sensitive Filtering)
• 저해상도 -> 고해상도 up-sampling 되면서 극심한 edge aliasing 이 발생
Bilinear filter
DSF
Determining Lighting Sample Validity
• normal 과 depth 를 비교▫ Bilateral filtering
Slow •Two textures•Nonlinear depth•Normal reconstruction
DSF Buffer
•Linear Depth (red)•Object/Instance ID (green)•Normal Group ID (blue)
Single ID in DSF buffer (DSF ID)
Using DSF Buffer• Depth 와 ID 를 비교한다 .• bias bilinear filtering weights• material 정보와 결합
Pixel ShaderD
ep
th
DS
F
ID
Fetch Fetch
Albe
do, e
tc…
Light Pre-Pass Rendering (33fps)
•DSF
Inferred Lighting (40fps)
•DSF
Inferred Lighting vs. Forward Render-ing
•101 objects, 81 lights. (xbox360)▫Inferred Lighting: 29.4ms (34fps)▫Forward Rendering: 167ms (6fps)
References
•http://graphics.cs.uiuc.edu/~kircher/publications.html
•[GDC04] Deferred Shading (Shawn Harg-reaves)