4 2 (1)

431 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
431
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

4 2 (1)

  1. 1. ShaderX4<br />4.2 Eliminating Surface Acne with Gradient Shadow Mapping<br />ohyecloudy(http://ohyecloudy.com)<br />shader study(http://cafe.naver.com/shader.cafe) <br />
  2. 2. The Phenomenon of Surface Acne<br />Depth Bias to the Rescue<br />Depth Gradient<br />Depth Comparison as a Fuzzy Function<br />Conclusion<br />
  3. 3.
  4. 4. Light<br />Sampled surface<br />깊이 맵에서 샘플링 된 깊이 값.<br />Surface<br />렌더링하는 오브젝트 표면<br />False Shadow<br />
  5. 5. The Phenomenon of Surface Acne<br />Depth Bias to the Rescue<br />Depth Gradient<br />Depth Comparison as a Fuzzy Function<br />Conclusion<br />
  6. 6. Light<br />Light<br />Depth Bias<br />평면에선 문제가 없다.<br />
  7. 7. false nonshadowing<br />지나친 depth bias로 그림자가 생겨야 할 곳에<br />안 생긴다.<br />곡면에선<br />적절한 Depth Bias가<br />Depth Gradient마다 다르다.<br />곡면에선 문제<br />
  8. 8.
  9. 9. The Phenomenon of Surface Acne<br />Depth Bias to the Rescue<br />Depth Gradient<br />Depth Comparison as a Fuzzy Function<br />Conclusion<br />
  10. 10. Light<br />depth map에서 이웃 샘플간 차이<br />입사각의 탄젠트와 비례한다.<br />bias scale에 사용 가능.<br />Depth Bias<br />Depth Gradient<br />
  11. 11. // gradient calculation<br />float pixeloffset = INVPIXEL / 2; <br />float4 depths = float4(<br /> tex2D( ShadowSampler, shadowP + float2( -pixeloffset, 0 ) ).x,<br /> tex2D( ShadowSampler, shadowP + float2( +pixeloffset, 0 ) ).x,<br /> tex2D( ShadowSampler, shadowP + float2( 0, -pixeloffset ) ).x,<br />tex2D( ShadowSampler, shadowP + float2( 0, +pixeloffset ) ).x );<br />float2 differences = abs( depths.yw - depths.xz );<br />float gradient = <br /> min( GradientClamp, max( differences.x, differences.y ) );<br />difference<br />
  12. 12. The Phenomenon of Surface Acne<br />Depth Bias to the Rescue<br />Depth Gradient<br />Depth Comparison as a Fuzzy Function<br />Conclusion<br />
  13. 13. Fuzzy depth comparison<br />unbiased depth comparison<br />1<br />uncertainty region<br />
  14. 14. // visibility function<br />float delta_z= centerdepth + gradient * ShadowGradientScaleBias- In.ShadowmapCoord.z;<br />float visibility = saturate( 1 + delta_z / ( gradient * ShadowFuzzyWidth ) );<br />
  15. 15.
  16. 16. The Phenomenon of Surface Acne<br />Depth Bias to the Rescue<br />Depth Gradient<br />Depth Comparison as a Fuzzy Function<br />Conclusion<br />
  17. 17. 왜 acne가 생기는지 알아봤다.<br />surface acne를 없애기 위한 기술<br />depth bias<br />gradient-scaled bias<br />fuzzy function<br />

×