Now that i can use light in my game, i have to decide if i want to use forward rendering or deferred rendering.
The forward rendering is the obvious one, and it consists of rendering each object for every light in the scene. I used it till now.
Deferred rendering on the other hand is divided in two main step: first make a rendering step for each object, and save normals, diffuse color, specular color and position of the rendered pixels in 4 buffers.
Then render again using these 4 buffers as inputs and apply light calculations.
This second method become better and better the more lights and objects are on the screen, but also has a few bad drawbacks, like the inability to use anti-aliasing or transparent objects.
I will go with deferred rendering, because it's harder to implement (which is a plus) and very interesting conceptually, but it will require sometime.
Today i didn't write a line of code, because i studied these stuff, tomorrow i'll have to continue studying but maybe i'll start writing something.
Nessun commento:
Posta un commento