2d Filters Updated, Custom Filter, now availabe for download

Hi all,

Now you can see more on 2d filters.
i complete the 2d filter, and now there is filter named, custom filter that you can write your own GLSL for 2d filtering.

see http://blender.gameengine.googlepages.com for more information.

source code is available via game_engine branch https://svn.blender.org/svnroot/bf-blender/branches/game_engine/

EDIT: now you can download the latest windows build of game engine branch in http://blender.gameengine.googlepages.com/downloads

will this be in blender 2.50?
I love the idea of 2d filters :slight_smile:

Thanks for doing this :smiley:

wow… thanks for keeping interested in the game engine… this is sweet

Well done :yes: !
On your site i cant find the binaries. Maybe im miss the link?

A question, the bgl_RenderedTexture function mean that i can use Render To Texture in glsl, and this way possible create a glsl reflect water shader?

That would be sweat…

By the way, the download page on the website is empty. Can’t download the new binaries.

I’ll upload the latest release to download page asap.

bgl_RenderedTexture is a sampler2D that you can use it to get pixels from rendered frame

bgl_RenderedTexture isn’t a function it’s a uniform variable that passed to shader program via blender, so you can use it as input. for example :

uniform sampler2D bgl_RenderedTexture;

void main(void)
    vec4 texcolor = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st); 
    float gray = dot(texcolor.rgb, vec3(0.299, 0.587, 0.114));
    gl_FragColor = vec4(gray * vec3(1.2, 1.0, 0.8), texcolor.a);

this code is a shader that use bgl_RenderedTexture as input and output gl_FragColor based on bgl_RenderedTexture.

I hope so, I can’t find the build on the download page either, in fact, there’s nothing on the download page.

Custom filters sound really nice, even I could make one if there was decent documentation on the python filter functions.

i’m uploading full blender (11M), it takes time on my connection.

Well it’s good that it’s being uploaded, I can’t wait to get the newest GE build.

Now you can download latest game engine branch from http://blender.gameengine.googlepages.com/downloads

Thanks, while I had to download winRAR it works pretty good, and I get some noticable speedup using display lists with vertex arrays.

You might want to put up a .zip file next time for Windows users, I only have the trial version of WinRAR and I can open .zip files.

zip file of this build went over 10M, and i can’t upload it on googlepages, so i rar it.
to extract archive files on windows you can use 7zip

Well I guess I’m doing something wrong. Running the filters on quite an intensive blend which runs at about 30fps normally. The filters reduce it to 2 fps except for the Motion Blur which doesn’t seem to do anything and runs at 30.

how many filters do you use? because more than 2 or 3 will reduce fps

Thanks, Zaghaghi :slight_smile:

Zaghaghi, I’m just using the one filter ):

can you give me the blend file?

Ah found the problem. I was using an ‘always’ sensor instead of the keyboard. If you do that, pulse mode or not, the frame rate drops to 2 fps.

Would be nice to use some sort of always sensor though…

yup, and its because of shaders take many time to compile and link, and with alwayse sensor you do that in each time step. if you want a filter goes on and off repeatedly, in game startup, setup filter or filters you want on passes, then use “disable filter” and “enable filter”