0
Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# DOF

879

Published on

DOF, depth of field

DOF, depth of field

Published in: Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

Views
Total Views
879
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
6
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. Depth of Field http://ozlael.egloos.com/
• 2. DOF 란 ● 피사계심도 ● 사진 렌즈로 어떤 거리의 피사체에 초점을 맞추면 그 앞쪽 [ 近點 ] 과 뒤쪽 [ 遠點 ] 의 일정한 거리 내에 초점이 맞는데 이때 그 범 위를 이르는 말 . ● PhotoRealistic Rendering
• 3. Pinhole Camera Model
• 4. Thin Lens Camera Model
• 5. Implementation ● Simulation of CoC ● Pass 1 : Scene Rendering ● Pass 2 : Pos-processing
• 6. Pass 1 : Scene Rendering ● 장면 랜더링 ● Depth and Blurriness factor ● MRT 사용
• 7. Pass 1 : Scene Rendering ● Depth
• 8. Pass 1 : Scene Rendering ● Mapping Depth to Blur Focal Range 1 Blur Depth -1 Focal Dist float blur = saturate( abs( depth - focalDist) * (2/focalRange));
• 9. Pass 1 : Scene Rendering ● MRT output
• 10. Pass 2 : Pos-processing ● Use CoC ● Poisson distribution
• 11. Pass 2 : Pos-processing ● Blurriness 와 Filter Size
• 12. Pass 2 : Pos-processing ● Leaking
• 13. Pass 2 : Pos-processing // Get center sample float4 colorSum = tex2D(SceneColorSampler, v.vTexCoord); float2 centerDepthBlur = tex2D(DepthBlurSampler, v.vTexCoord); // Compute CoC size based on blurriness float sizeCoC = centerDepthBlur.y * maxCoC; float totalContribution = 1.0f; // Run through all taps for (int i = 0; i < NUM_DOF_TAPS; i++) { // Compute tap coordinates float2 tapCoord = v.vTexCoord + filterTaps[i] * sizeCoC; // Fetch tap sample float4 tapColor = tex2D(SceneColorSampler, tapCoord); float2 tapDepthBlur = tex2D(DepthBlurSampler, tapCoord); // Compute tap contribution float tapContribution = (tapDepthBlur.x > centerDepthBlur.x) ? 탭의 깊이 비교 1.0f : tapDepthBlur.y; // Accumulate color and contribution 샘플링 탭이 Blurriness 0 면 색이 적용 X colorSum += tapColor * tapContribution; totalContribution += tapContribution; } // Normalize to get proper luminance float4 finalColor = colorSum / totalContribution;