Shader X 7 2 4 Fast Skin Shading

  • Slides: 15
Download presentation
Shader. X 7 2. 4. Fast Skin Shading John Hable, George Borshukov, Jim Hejl

Shader. X 7 2. 4. Fast Skin Shading John Hable, George Borshukov, Jim Hejl Shader Study (http: //cafe. naver. com/shader) 임용균

Diffuse • 피부의 한 점의 diffuse를 계산하기 위해서는 그 점 주변의 들어오는 빛의 intensity를

Diffuse • 피부의 한 점의 diffuse를 계산하기 위해서는 그 점 주변의 들어오는 빛의 intensity를 알아야 한다. • diffusion dipole로 거의 해결되었다. [Donner 05] – 빛과 점의 거리에 따라 red, green, blue의 intensity가 다른 커브를 발견. • diffusion dipole을 blur들의 합으로 분해할 수 있다. – real-time으로 실행할 수 있다. • 5번의 7 x 7 gaussian blur가 1번의 50 x 50 gaussian blur보다 빠르다. • blur 회수를 조절하여 다양한 피부 타입을 나타내는것이 가능하다. Variance (mm^2) Red Green Blue 0. 0064 0. 233 0. 455 0. 649 0. 0484 0. 100 0. 336 0. 344 0. 187 0. 118 0. 198 0 0. 567 0. 113 0. 007 1. 99 0. 358 0. 004 0 7. 41 0. 078 0 0

Our Contributions float 3 blur. Jittered. Weights[13] = { { 0. 220441, 0. 437000,

Our Contributions float 3 blur. Jittered. Weights[13] = { { 0. 220441, 0. 437000, 0. 635000 { 0. 076356, 0. 064487, 0. 039097 { 0. 116515, 0. 103222, 0. 064912 { 0. 064844, 0. 086388, 0. 062272 { 0. 131798, 0. 151695, 0. 103676 { 0. 025690, 0. 042728, 0. 033003 { 0. 048593, 0. 064740, 0. 046131 { 0. 048092, 0. 003042, 0. 000400 { 0. 048845, 0. 005406, 0. 001222 { 0. 051322, 0. 006034, 0. 001420 { 0. 061428, 0. 009152, 0. 002511 { 0. 030936, 0. 002868, 0. 000652 { 0. 073580, 0. 023239, 0. 009703 }; }, }, }, }, float 2 blur. Jittered. Samples[13] = { { 0. 000000, 0. 000000 }, { 1. 633992, 0. 036795 }, { 0. 177801, 1. 717593 }, { -0. 194906, 0. 091094 }, { -0. 239737, -0. 220217 }, { -0. 003530, -0. 118219 }, { 1. 320107, -0. 181542 }, { 5. 970690, 0. 253378 }, { -1. 089250, 4. 958349 }, { -4. 015465, 4. 156699 }, { -4. 063099, -4. 110150 }, { -0. 638605, -6. 297663 }, { 2. 542348, -3. 245901 }, };

Our Contributions • blur pass float 3 total. Color = 0; float 2 strectch

Our Contributions • blur pass float 3 total. Color = 0; float 2 strectch = tex 2 D(Stretch. Texture. Blurred, uv. xy). rg; float shadow = tex 2 D(Light. Map, uv. xy). a; for (int i=0; i<=12; i++) total. Color += Subsurface. Jitter. Sampler(uv. xy, stretch, i);

Final Shader float diffuse = saturate(dot(light. Vec, normal)); float final. Shadow = tex 2

Final Shader float diffuse = saturate(dot(light. Vec, normal)); float final. Shadow = tex 2 D(Lightmap. Combine. Blur, uv. xy). w; float 3 read. Model. Color = pow(tex 2 D(Head. Diffuse, uv. xy), 2. 2); float 4 out. Color = float 4(0, 0, 0, 1); float 3 linear. Light. Color = pow(light. Color, 2. 2) * light. Brightness; float 3 diffuse. Point = Kd * linear. Light. Color * diffuse * final. Shadow; float lightmap. Amount = tex 2 D(Stretch. Texture, uv. xy). b; float 3 diffuse. Blurred = Kd * tex 2 D(Lightmap. Combined. Bllur, float 2(uv. x, uv. y)). rgb; diffuse. Color = blur. Jittered. Weights[0] diffuse. Point + lerp((float 3(1, 1, 1) – blur. Jittered. Weights[0]) * diffuse. Point, diffuse. Blurred, lightmap. Amount); specular = Kelemen. Szirmau. Kalos. Spec(normalize(view. Vec), normal, light. Vec, eccentricity, rolloff, weight); out. Color. rgb = Ao * Ka * real. Model. Color + (diffuse. Color * real. Model. Color + k. S * linear. Light. Color * specular * final. Shadow);