Duplicating a Bitmap?

Posted By: Ichiro

Duplicating a Bitmap? - 06/21/06 15:07



Is there a way to duplicate-and-scale a bitmap quickly (i.e., once every frame)? Per Grimber's suggestion here, I'd like to try layering two views, but I'd like to avoid having to render the entire thing twice.

Thanks.
Posted By: Bird

Re: Duplicating a Bitmap? - 06/21/06 17:25

isn't render_to_texture onto a view entity possible?

btw, Ichiro: your games rock!
Posted By: Ichiro

Re: Duplicating a Bitmap? - 06/21/06 18:30

isn't render_to_texture onto a view entity possible?

That may be what I'm doing already with view.bmap (though to be honest, I'm just learning about all this now). What I'd ultimately like to do is:

1. Render the view to a 1024x768 bitmap.
2. Copy that view to a 256x192 bitmap (rather than re-rendering the whole thing).
3. Overlay #2 on #1 (e.g., bitmap #2 is displayed with 50% alpha, stretched to 1024x768).
4. Possibly use additive blending when overlaying (perhaps using the SDK?) to get a poor man's bloom effect.

btw, Ichiro: your games rock!

Thank you! That's nice of you to say. :)
Posted By: Grimber

Re: Duplicating a Bitmap? - 06/21/06 18:38

Im not sure a bmap_for_screen or a file_for_screen would be faster then a second rendered view

another possible idea is use a flat mesh ( size of your screen set it up to face the view rather like a panel) then bmap_for_screen bmap_for_entity it then try deforming the mesh the mesh for distortion

but any of these methods would be a hit on framerate

only other option i can think of is a shader that would somehow pull pull/smear pixels based on a vector distance and direction ( closer to center less distance pulled/smeared) from the center of the screen. would need one of them shader gurus to see if thats possible.
Posted By: PHeMoX

Re: Duplicating a Bitmap? - 07/09/06 19:52

The way I understand bmap_for_screen requires a full frame to be saved (wait(1); hehehe) and then you haven't processed it yet, only saved it, so using that method would have quite an impact no matter what ...

Cheers
© 2024 lite-C Forums