์นด๋ฉ๋ผ๋ฅผ ํ๋ํ๊ณ ์ฝ๊ฐ ์ด๋ํ๋ฉด ์ธ๊ณต๋ฌผ์ด ์ฌํ ๋ ์ ์์ต๋๋ค.
https://threejs.org/examples/webgl_mirror.html
๊ณผ์ฐ.
์ด ์ฃผ์ ๋ ์ฐธ์กฐํ์ญ์์ค : https://github.com/mrdoob/three.js/issues/11885
๊ฒฐ๊ตญ ๋๋ Mirror๊ฐ ์ ๋๋ก ๊ตฌํ๋์ง ์์ ๋๋์๋ฐ์ต๋๋ค.
๋ฉ์ธ ์นด๋ฉ๋ผ์ ํ๋ฉด ๋น์จ์ ๋ฏธ๋ฌ ์นด๋ฉ๋ผ์ ๋ณต์ฌ๋์ง ์์ต๋๋ค.
// "examples/Mirror.js" (lines 142-146)
mirrorCamera.near = camera.near;
mirrorCamera.far = camera.far;
mirrorCamera.updateMatrixWorld();
mirrorCamera.updateProjectionMatrix();
๋ค์์ผ๋ก ๋ณ๊ฒฝํด์ผํฉ๋๋ค.
mirrorCamera.updateMatrixWorld();
mirrorCamera.projectionMatrix.copy(camera.projectionMatrix);
๋์ค์ PR์ ๋ณด๋ด๊ฒ ์ต๋๋ค!
๊ฑฐ์ธ (๋ฐ ํ๋ฉด ๋ฐ๋ค)์ ๋ ๋ค๋ฅธ ๋ฌธ์ ๋ logarithmicDepthBuffer
๊ฐ ํ์ฑํ๋์์ ๋ ์๋ํ์ง ์๋ ๊ฒ ๊ฐ์ต๋๋ค. ํ๋ฉด ํด๋ฆฌํ์ ๊น์ด๊ฐ ์๋ง์ด๋๊ณ ์ด์ ๋ํ ํด๊ฒฐ์ฑ
์ ์ฐพ์ง ๋ชปํ์ต๋๋ค. WebGL์ glClipPlane
์์์ผ๋ฉด ์ข๊ฒ ์ต๋๋ค ๐
@vanruesc ์ฝ๋๋ฅผ ์๋ง์ผ๋ก
@mrdoob ์ฌ์ ํ ์๋ง์ด ๋ ๊ฒฝ์ฐ ๋จ์ํ ํ ์ฌ์ง๊ฐ ์๋ค๊ณ ์๊ฐํฉ๋๋ค ...
//mirrorCamera.up.set( 0, - 1, 0 );
//mirrorCamera.up.applyMatrix4( rotationMatrix );
//mirrorCamera.up.reflect( normal ).negate();
mirrorCamera.up.set( 0, 1, 0 ).applyMatrix4( rotationMatrix ).reflect( normal );
@WestLangley ๊ฐ์ฌํฉ๋๋ค!
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
@mrdoob ์ฌ์ ํ ์๋ง์ด ๋ ๊ฒฝ์ฐ ๋จ์ํ ํ ์ฌ์ง๊ฐ ์๋ค๊ณ ์๊ฐํฉ๋๋ค ...