Spellcaster Studios

Make it happen…

Tag Archives: ssao

OpenGL Ambient Occlusion

Finished the ambient occlusion system, in OpenGL as well… Before: After: Also arrived to the conclusion that I can’t really use the ambient occlusion to make the sprite shadows (they’re too small to actually impact the occlusion properly)… So I’ll have to use either the shadow system (still under consideration) or the decal system (waiting […]

Tweaking

Today I didn’t have much time to work on the game, so I basically just tweaked the ambient occlusion parameters and saw where they went… First experiment was to see if better filtering would help the algorithm… Of course, the filtering improves the effect, but visually it doesn’t add anything, so I’ll keep the low-cost […]

A bit disappointed…

…with the results of the ambient occlusion in practice… It works fine now, but it’s extremely difficult to notice, which makes this whole endeavor kind of pointless… The effect is clearly there (note the corners and the far edges of the shelves), but it doesn’t help much with the whole lack of contrast I wanted […]

Almost done!

After a long battle with almost every single line of code of the screenspace effect system, I managed to get something resembling ambient occlusion! Now I need to add a blur filter to remove the artifacts and I can run tests on the actual scenes, see how good they look, and to see if I […]

Close, but not there…

Found some of the problems of the system yesterday, but the results are still terrible: It was inverted on this screenshot due to lack of correction of texture coordinates to screen coordinates. Anyway, the problem I’m having is reconstructing the camera-relative position of the pixels, based on the depth and field-of-view… Something is going wrong […]

First trial!

..and it didn’t go very well… I can distinguish some features (if I move around), but it seems… wrong… It’s like only the part in the middle Y of the screen is having ambient occlusion computed more or less correctly, and I’ve been looking at this shader for almost one hour and I can’t figure […]

Computing a basis

For the SSAO, we have to compute a basis for the points to be able to do the random sampling… My linear algebra was a bit rusted, but I found the Gram-Schmidt process to be useful for this. Basically it creates a geometric orthogonal from vectors, which define a local space, in my case aligned […]

View-space normals

Working on this a couple of hours at a time is not efficient, but time has been rather short lately… Anyway, added view-space normals to the renderer, so I can do the screenspace effect: It doesn’t seem very different, but it is… Anyway, I need the view-space normals because I’m using view space positions, and […]

So much lost time…

So today I started implementing SSAO, and it was demoralizing… I was looking into my old SSAO shaders, and I decided to implement the simple version before moving towards more complex versions, and I hit the first hurdle… When I started work on my deferred renderer (which was going to be used by the SSAO […]