(martinsh) #1

Screen Space Global Illumination

implemented based on this article:

a screenshot:

and a blend:

space: enables a pass of ssgi
left Shift: enables another pass of ssgi

Filter is too slow to be used in game yet, nonetheless it`s quite awesome.
also random sampling slows it down quite a bit. I should use a prebaked texture for it.

Have fun!

(Pikol) #2

Excelent as always, I get amazed at every demo you show us

(psychotron) #3

yes ssgi in bge :smiley:
was what that ingredience blender is missing for do ssgi you talked before some days? are you hack it or?

I do little scene mod, put more proper cornell box (0.5m edges), gamma reverse colors and add your gamma filter to the key G - hope you don’t mind
I want to see how it compare to other renders of cbox… and I’m surprised, pretty result for glsl

here is blend file if someone is interested

btw what blender game engine needs to run those glsl 2d filters you made at speed of light? :slight_smile:

(blendman) #4

Cool :-).

(qv51) #5

@Martinsh: would you mind checking it a little ??? It doesn’t work on ATI, saying something about unacceptable conversion in line 69 of the ssgi script :frowning:

anyway it looks great in the screenshot :slight_smile:

(Krumel) #6

@qv51: Replace in ssao and ssao1
line 69 with “vec3 random = vec3(rand(gl_TexCoord[0].st*fres.xy));”
line 73 with “float depth = readDepth(gl_TexCoord[0].st);”
and line 98 with "gl_FragColor = vec4(readColor(gl_TexCoord[0].st)*finalAO+finalGI,1.0); "
It should work now (At least it does for me).

(Ace Dragon) #7

Pretty sweet filter, I tested two of my games with it and the graphical enhancement is fairly noticable.

Now if a friendly BGE dev. can implement simple downsampling we can see some more serious use of this filter.

(qv51) #8

@Krumel: Thanks :slight_smile: It works now and runs at 50 FPS, not so bad for my computer :smiley:

(Excalaberr) #9

Wow, this is quite nice, but runs at 7 frames on my computer, which my computer is about mid range, I think my computer dislikes something the script does.

Hows the geometry tessellation going?

(martinsh) #10

Thanks people!

exactly, it is barely noticable in real games (unless you have a game with exaggerated colors), and yet too slow to be used in a game right now.
And yeah with downsampling all these filters (bloom, dof, blur, ssao…) will be much more faster.

nah, found a new and easier filter. :slight_smile:

pretty nice, everything works. now i need a displacement mapping to work.

(JohnnyBlack) #11

hey it doesent work at me,why?

(toonist) #12

steals the rand function from martinsh’s code

If you take the color bleed out, the method runs about twice faster when ran on a 256x256 buffer compared to larger buffer without color bleed as well, the smaller buffer introduces some artefacts though… Still quite slow post processing effect…

(valek27) #13

rain filter?

(rolo_gl) #14

Impressive, it would be nice to have this on the renderer too, at least there doesn’t really matter framerate…

(Independentsoul) #15

dude Im amazed. U finnaly did it =D congrats

(Independentsoul) #16

It´s just a Idea… why dont u try to blur the sampling texture… not the GI…
*gauss or something =D

EDIT: can U show us/me how to blur(gaus) the individual part? e.g Sampling texture… GI… AO…
I don´t get it :((

(leonnn) #17

Amazing, its heavy but, i think that gives a nice look to the project.
Congratulations, its amazing.
Martinsh, there s a way to remove the timer property for example, atach this property directly on the filter by scripting?
Awesome work

(laser blaster) #18

It doesn’t seem to work for me, I push space and nothing happens. Am I missing something?

(Rorkimaru) #19

looks amazing. Runs at a blazing fast 3fps on my rig though. Still, great work as always

(Independentsoul) #20

I´m impressed of Realtime Screen Space Global Illumination