[OpenGL] 5. Vertex Processor

scarleter99ยท2023๋…„ 4์›” 13์ผ
0

OpenGL

๋ชฉ๋ก ๋ณด๊ธฐ
5/10

๐Ÿ“Œ Vertex Processor

  • ์ •์  ์ขŒํ‘œ๋ฅผ ์ขŒํ‘œ๊ณ„์— ๋”ฐ๋ผ ์ˆœ์ฐจ์ ์œผ๋กœ ๋ณ€ํ™˜์‹œ์ผœ ์นด๋ฉ”๋ผ ๊ธฐ์ค€์˜ ์ขŒํ‘œ๊ณ„๋กœ ๋งž์ถ˜๋‹ค.
    • Object coordinates -> Camera coordinates -> Clip Coordinates -> Screen coordinates ์ˆœ์œผ๋กœ ๋ณ€ํ™˜ํ•œ๋‹ค.

ModelView Matrix

  • Object Coordinates๋ฅผ Camera Coordinates๋กœ ๋ณ€ํ™˜ํ•œ๋‹ค.
    • xview=Vโˆ’1Mxobjx_{view} = V^{-1}Mx_{obj}

Projection Matrix

  • Camera Coordinates๋ฅผ Clip Coordinates๋กœ ๋ณ€ํ™˜ํ•œ๋‹ค.

    • xclip=Pxview=PVโˆ’1Mxobjx_{clip} = Px_{view} = PV^{-1}Mx_{obj}
  • Field of View (FOV)

    • Zoom-In/OUT์„ ๋‹ค๋ฃฌ๋‹ค.
  • z๊ฐ’์€ ์นด๋ฉ”๋ผ์— ๊ฐ€๊นŒ์šด ์ชฝ์ด ์–‘์ˆ˜์ด๋‹ค.


Viewport

  • Clip Coordinates๋ฅผ Screen-Space Coordinates๋กœ ๋ณ€ํ™˜ํ•œ๋‹ค.
    • xscreen=Wxclip=WPxview=WPVโˆ’1Mxobjx_{screen} = Wx_{clip} = WPx_{view} = WPV^{-1}Mx_{obj}
  • Clip Space ๋‚ด๋ถ€์— ์žˆ๋Š” ๊ฐ์ฒด๋“ค์„ ์Šคํฌ๋ฆฐ์œผ๋กœ ํˆฌ์˜์‹œํ‚จ๋‹ค.

0๊ฐœ์˜ ๋Œ“๊ธ€