frame buffer access

Posted By: gettarobox

frame buffer access - 02/24/07 03:54

i was just wondering if GS allows you to access the frame buffer.
Posted By: Spirit

Re: frame buffer access - 02/24/07 04:50

Yes with a plugin, but you need C++ for that. Else you can copy the framebuffer to a bitmap or paint into it but not direct access it.
Posted By: gettarobox

Re: frame buffer access - 02/24/07 06:00

cool. is that like bmap_for_screen (bmap, var factor, var offset);
so is it possible to do post processing type stuff then? i'm thinking real time brightness adjustment.
Posted By: Excessus

Re: frame buffer access - 02/24/07 10:44

Yes, normally you would render the view into a bitmap (view.bmap, pro feature) and use that bitmap as a skin for a view entity that has a post processing shader applied.

If don't have pro, you have to use an external language for this.
Posted By: Matt_Aufderheide

Re: frame buffer access - 02/24/07 14:02

Quote:

Yes, normally you would render the view into a bitmap




Thats a horrible way to do he wants.

Think about it, why render the same scene twice? Using Pro to render the scene to a bitmap is bad method that doubles rendering time.

unfortunately, the bmap_for_screen function is currently too slow (at least it was last time i checked) to be used in realtime every frame, so you are stuck.. unless you make a simple dll.
Posted By: Excessus

Re: frame buffer access - 02/24/07 14:29

It's been a long time since I've messed with postprocessing in A6, but I thought this was common practice, and don't see why this would lead to double rendering. Are you sure about that? Doesn't it just copy the framebuffer to the bitmap after rendering? Or is it that you cannot just render the view entity without also rendering the scene a second time?
Posted By: Matt_Aufderheide

Re: frame buffer access - 02/24/07 14:37

Actually I'm not sure how A6 handles this command if you just try grab the camera.bitmap.. maybe it just copies the curretn backbuffer.. i dont really know.
Posted By: gettarobox

Re: frame buffer access - 02/24/07 14:53

being able to render to texture seems like one of those things a game engine must have nowadays. it'a fairly simple way to make things go from meh to wow with all the post stuff it enables you to do.

this is a bit off topic but: how about if i wanted to have the sun send out traces to determine where shadows would be casted and then write the shadows to the blue channel of the multiterrain mtl with a lineardodge type calculation? hope this makes sense. i figure if it could do this once at the begining of runtime it would be a great way to make shadows on terrains if it is possible.
Posted By: Excessus

Re: frame buffer access - 02/24/07 17:16

You'd have to do some testing to see if the method I described indeed renders the scene twice. If it does, you'll have to write a small plugin as Matt suggested.

Such a shadowmapping script has been written and it can be found on the wiki (link at the top/botom of this page). Here it is: link.
© 2024 lite-C Forums