zaghaghi
(zaghaghi)
November 6, 2007, 4:13am
1
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
Mmph
(Mmph!)
November 6, 2007, 4:32am
2
will this be in blender 2.50?
I love the idea of 2d filters
Thanks for doing this
kirado
(kirado)
November 6, 2007, 6:19am
3
wow… thanks for keeping interested in the game engine… this is sweet
squareline
(squareline)
November 6, 2007, 6:50am
4
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?
laky_spy
(laky_spy)
November 6, 2007, 8:58am
5
That would be sweat…
By the way, the download page on the website is empty. Can’t download the new binaries.
zaghaghi
(zaghaghi)
November 6, 2007, 9:02am
6
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
zaghaghi
(zaghaghi)
November 6, 2007, 9:18am
7
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.
Ace_Dragon
(Ace Dragon)
November 6, 2007, 11:45am
8
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.
zaghaghi
(zaghaghi)
November 6, 2007, 11:59am
9
i’m uploading full blender (11M), it takes time on my connection.
Ace_Dragon
(Ace Dragon)
November 6, 2007, 12:11pm
10
Well it’s good that it’s being uploaded, I can’t wait to get the newest GE build.
zaghaghi
(zaghaghi)
November 6, 2007, 1:53pm
11
Now you can download latest game engine branch from http://blender.gameengine.googlepages.com/downloads
Ace_Dragon
(Ace Dragon)
November 6, 2007, 2:42pm
12
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.
zaghaghi
(zaghaghi)
November 6, 2007, 3:03pm
13
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
Larryboy
(Larryboy)
November 6, 2007, 4:28pm
14
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.
zaghaghi
(zaghaghi)
November 6, 2007, 5:13pm
15
how many filters do you use? because more than 2 or 3 will reduce fps
Larryboy
(Larryboy)
November 7, 2007, 1:15am
17
Zaghaghi, I’m just using the one filter ):
zaghaghi
(zaghaghi)
November 7, 2007, 1:26am
18
can you give me the blend file?
Larryboy
(Larryboy)
November 7, 2007, 5:00pm
19
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…
zaghaghi
(zaghaghi)
November 7, 2007, 9:26pm
20
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”