Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Is there a way to blur texture from RenderSurface?  (Read 646 times)
DarekRuman
Community Member
*
Posts: 102

game developer


WWW
« on: March 22, 2008, 09:18:37 AM »

Hi  Smiley

Is there a way to blur texture from RenderSurface before drawing on screen?

I'm rendering all stuff to rendersurface (size equal to size of game screen - 1:1)
Than in 2d rendering stuff - i'm drawing rendersurface.gettexture to screen and in next step i want to draw blended and blured rendersurface texture to get a fake-bloom effect Grin

I know that there is a way to do in with another smaller rendersurface (render all stuff again in there) and than draw it stretched on screen (and we got something like blur) but i do lot of rendering billboards and it hit my FPS very very hard!!  Embarrassed

Is there a way to resize my rendersurface.gettexture and than render it stretched on screen? (to avoid another rendering to smaller rendersurface)

Thanks for any help! Grin
Logged

www.reddotgames.pl
tv6.3 tv6.5 developer
nateslunaXX
Community Member
*
Posts: 229

Be cool..! Study Hard...


« Reply #1 on: March 23, 2008, 12:55:26 PM »

hmmmm....render it to a billboard either away or close to the camera then render it last or shaders?
Logged


Nathan Alcon, BSIT - Life is a never ending Cycle of Learning
DarekRuman
Community Member
*
Posts: 102

game developer


WWW
« Reply #2 on: March 25, 2008, 07:30:20 AM »

hmmmm....render it to a billboard either away or close to the camera then render it last or shaders?

sorry ... can't understand your idea
Logged

www.reddotgames.pl
tv6.3 tv6.5 developer
nateslunaXX
Community Member
*
Posts: 229

Be cool..! Study Hard...


« Reply #3 on: March 25, 2008, 09:50:26 AM »

well, i just thought that things get blurry when they are far away right?
so position it away from the camera, then it gets blurry but smaller.

it was just a thought..nevermind.
what about rendering the image 4 or more times to a rendersurface with a small difference in Xs and Ys with lower opacities? sorry not much of a help.
Logged


Nathan Alcon, BSIT - Life is a never ending Cycle of Learning
DarekRuman
Community Member
*
Posts: 102

game developer


WWW
« Reply #4 on: April 09, 2008, 02:08:16 PM »

Yeah i made it Smiley

init :
rendersurface1 - dimensions : your screen size.x , your screen size.y
rendersurface2 - dimensions : your screen size.x / 4 , your screen size.y / 4

1. Render all stuff (exept 2d) to rendersurface1

2. Render rendersurface1.gettex on rendersurface2 // now you've got some kind blurred screen of your 3d rendering

3. Next draw rendersurface1.gettex in 2d mode using DRAW_Texture, than change blending to multiply or smth and alpha draw (few time) rendersurface2.gettex by streching it to all screen :]

Finito Smiley

Greetz - back to work

Logged

www.reddotgames.pl
tv6.3 tv6.5 developer
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks