Yesterday i added a portalrenderer ontop of my cutoutshader.

The blue point on the portal is for debugging and marks the closest point on the portal to the camera.

Why do i need the closest distance?
We all know, if a portalcam moves backwards(as we do), it might pass a wall behind it and the obstacle is rendered. But we dont want it. SO i adjust the clip_near value of the portalcam at runtime to allow a freelook at my target.

see? The block is placed directly behind my portalcam, but the block is cutout by the clip_near value when moving backwards.

Sadly, it still has a flaw when the distance is too big and we rotate the cam. To much will be clipped away, because of the frustrums pyramidshape frown

Need to fix it somwhow

edit, the problem:
from far away

a slight turn to the left


Last edited by Rackscha; 07/13/12 20:03.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development