Skybox

Reflection

post_thumbnail

  • V - View๋กœ ํ–ฅํ•˜๋Š” ๋ฒกํ„ฐ
  • R - Reflection ๋ฒกํ„ฐ
  • N - ๋ฒ•์„  Vector (normalized)

  • R = N * cos(a) + S
    • cos(a) = (N * V)์ด๊ณ , (N * V) / magnitude(V) = V ๋ฒกํ„ฐ๊ฐ€ N์œผ๋กœ ํˆฌ์˜๋œ ๋ฒกํ„ฐ
      • ์œ„์˜ (N * V) / magnitude(V) ์‹์—์„œ N์€ ์ •๊ทœํ™”๋˜์ง€ ์•Š์€ ์ƒํƒœ
    • (N * V)์— ๋‹จ์œ„๋ฒกํ„ฐ N์„ ๊ณฑํ•˜๋ฉด ๋ฒ•์„  N ๋ฒกํ„ฐ๋ฅผ ๊ตฌํ•  ์ˆ˜ ์žˆ๋‹ค
  • S = N * cos(a) - V
  • R = 2 (N * cos(a)) - V
    • R = 2*(norm(N) * N * V) - V

Refraction

์Šค์นด์ด๋ฐ•์Šค(Skybox)

  • ์”ฌ์—์„œ ์ œ์ผ ๋จผ์ € ๋ Œ๋”๋ง๋œ๋‹ค
    • DepthTest๋Š” ํ•˜์ง€ ์•Š์Œ
  • ์นด๋ฉ”๋ผ์˜ viewpoint๋ฅผ ํ•ญ์ƒ ๋”ฐ๋ผ๋‹ค๋‹Œ๋‹ค

Dynamic Environment Mapping

  • environment mapping์„ ์œ„ํ•ด ๋“œ๋กœ์ž‰์„ ๊ฐ ์‹œ๋ฉด์˜ ๊ฐœ์ˆ˜(cubemap์ผ ๊ฒฝ์šฐ 6ํšŒ)๋งŒํผ ํ•ด์•ผํ•จ
  • ํ•œ๋ฒˆ์€ ์ธ๊ฒŒ์ž„ ์—…๋ฐ์ดํŠธ, ๋‹ค๋ฅธ ํ•˜๋‚˜๋Š” ํ…์Šค์ฒ˜์— ์ž…ํž ์Šคํฌ๋ฆฐ ๋ฒ„ํผ
  • ํ…์Šค์ณ๊ฐ€ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์—…๋ฐ์ดํŠธ ๋˜๋ฉด์„œ Dynamic Reflection/Dynamic Refraction ๊ฐ€๋Šฅใ…‰

์ถœ์ฒ˜