E= V·N
V: Direction of view
N: Mesh normal
if( E≥0 && E≤Threshold ) E is Edge
else E is Omitted

<Figure 1>
texColor;
g= texColor.r*0.3 + texColor.g*0.59 + texColor.b*0.11 //to Luminance
u= L·N
L: Direction of light
N: Mesh normal
c= tex2D(TexS, float2(u*g, 0.5f));

<Figure 2>

<Figure 3>

<Figure 4>

<Figure 5>
좌/우/상/하/좌상/우상/좌하/우하
값을 가져오되 stride 값을 이용하여 얼마나 떨어져 있는 값을 가져올 것인지 결정한다.

<Figure 6>
픽셀의 최종값을 c라고 할때,
c*= pow(c, gPower); 를이용하여 밝은 부분은 더 밝게, 어두운 부분은 더 어둡게 한다.

<Figure 7>
Stride와 gPower값을 적당히 변경한 경우이다.
V: Direction of view
N: Mesh normal
if( E≥0 && E≤Threshold ) E is Edge
else E is Omitted
<Figure 1>
texColor;
g= texColor.r*0.3 + texColor.g*0.59 + texColor.b*0.11 //to Luminance
u= L·N
L: Direction of light
N: Mesh normal
c= tex2D(TexS, float2(u*g, 0.5f));
<Figure 2>
<Figure 3>
<Figure 4>
<Figure 5>
좌/우/상/하/좌상/우상/좌하/우하
값을 가져오되 stride 값을 이용하여 얼마나 떨어져 있는 값을 가져올 것인지 결정한다.
<Figure 6>
픽셀의 최종값을 c라고 할때,
c*= pow(c, gPower); 를이용하여 밝은 부분은 더 밝게, 어두운 부분은 더 어둡게 한다.
<Figure 7>
Stride와 gPower값을 적당히 변경한 경우이다.
'Computer > Graphics' 카테고리의 다른 글
NPR Line Drawing (0) | 2010.01.10 |
---|---|
ID3DXRenderToSurface, IDirect3DSurface9 (0) | 2009.04.17 |
Motion Blur? (0) | 2008.12.05 |
수묵화 렌더링(?) (0) | 2008.11.02 |
Edge detection on GPU (0) | 2008.10.28 |