Irregular Viewport
Blitz3D Forums/Blitz3D Beginners Area/Irregular Viewport
| ||
Just wondering... is there a simple way to create an irregularly-shaped camera viewport, such as a circle? Or would you need tons of cameras, each capturing a single pixel or two? |
| ||
use a mesh and render to texture (oldschool with copyrect from backbuffer or newschool using TOMs DLL with r2t) - apply texture to this mesh. et voila. |
| ||
Whoa. That's surprisingly simple! |
| ||
didn't test it though. but it should work. i'll need that in my upcoming game. so sooner or later i will code that. |
| ||
there is one point missing here: Apply texture to a sprite and apply the "shape mask" as a second layer (with multiply. ie the white part defines the "viewport" and the black the cutout) Putting it onto a self made shape would work as well but need much more polygons to do so. |
| ||
Thanks a bundle! |