javascript - Correcting for perspective clipping in Three.js -


i have plane inside of sphere in three.js rendering shader can effects on sphere. use lookat align plane camera. issue experiencing if camera gets close sphere plane seems shrink sphere. have determined problem perspective nature of camera when camera gets close sphere rays don't align edge of plane anymore.

here picture visualizing this: perspective clipping

also here jsfiddle demonstrates this: https://jsfiddle.net/k8tc8ex6/1/

i know why issue occurs, want know possible solutions, trying achieve edge of plane appear touch edge of sphere after render.

thanks in advance!

if right trying "perfectly" fit mid section of sphere frustum of perspective camera. trying achieve impossible perspective view. said (demonstrated) plane exceed bounds of screen or there gaps edges of plane , screen.

if badly want "perfectly" fit midsection of sphere screen, have 2 options:

1-) switch orthographic camera 2-) stick perspective camera, make fov close 0, give huge distance far plane perspective camera act orthographic camera.


Comments