Hi there! now I have assigned 1.3 aspect ratio and created context menu for to select easily between effects. Shortcut is available with function keys too, F1-F10.
This is the end of the first lite version using glut. Is a lightweight version, I will use Qt for a complete and complex version in the future. Example of use:
To do normal mapping in Deferred Rendering is little dificult because you need to store in G-buffer tangent and binormal if you want, but it is easy to calculate. Or you can calculate TBN matrix per pixel with your 2D normal map stored in G-buffer. So I can’t do that because have high GPU consumption.
Other thing that you can to do is store in 8bit the result of “light power” calc in Geometry stage and then, use that in Lighting Stage. But “normal mapping” will be based in 1 light.
Anyway, we can do an approximation using a bling phong lighting and fast normal mapping calc:
I’m adjusting the params of my SSAO shaders. I’m trying to have more darkness in occlusion zones and more clean the others fragments. So adjusting selective fragments I have more performance.
I have now Big Dady 2 model fixed. The texture coords was inverted in V coord. Now I mix my deferred lighting implementation with SSAO. I have no specular map applied yet, but I have other problem here. Diffuse map of model has shadows like SSAO mixed with diffuse map. So the result is not awesome but looks really good.
Light with SSAO, no specular map applied
Light with SSAO, no specular map applied
Diffuse map mixed with shadows
I need other model
Diffuse map has bump wrinkle, shadows and normal mapping effect.
Today I see an error in SSAO calc, near of the camera you can see fake occlusion. This is definitely wrong. So now is fixed:
SSAO error
SSAO 16 samples
SSAO 8 samples
SSAO 4 samples
SSAO 2 samples
I tested different samples, I think 8 it is ok for normal GPU and 4 or 2 for slow GPUs. Is better to be SSAO with 2 or 4 samples than not to be. You can fix that with a blur downsampled x3 for example.
To be or not to be, this is the question . In this case, to be, of course!
Today I begin my SSAO based in many website, papers and forums. This first approach has around 2ms of cost. But if the camera is near to objects app performance down drastically. By the way it’s ok for first day of coding.
SSAO bricks looking good
I need to do 2 things, render in less resolution and to do a vertical and horizontal blur, then mix with specular and color. I believe the effect is really good now processing only, ALBEDO, NORMAL and DEPTH (in clip space).
If I complete this version soon I will relax and play a few poker hands next week. I hope this weekend to be finished the first version of ModelViewer lite version without GUI, supporting, color map + alpha pixel discard, normal map, specular map, height map for parallax mapping and deferred rendering architecture.