Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
270
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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