Today I think I've finally managed to complete the refactoring of the deferred renderer system.
All the remaining shaders (used internally by the renderer) have been automatized.
I also refactored a few function here and there which had problems... everything went unexpectedly straightforward, and everything should be fine now.
The main difference after this huge refactoring is that shaders can be created from the game, instead of using the fixed ones provided by me in the deferred rendering class. And they also automatically recognize the data to send to the shaders thanks to glsl program introspection.
Maybe I'll take a little pause now, however the next thing I'm gonna do will be to create a "transparent" object.
Now, transparency is impossible in deferred rendering, but I can create a special shader for this object who sample the skybox and use it to simulate transparency and refraction. Of course it won't reflect other objects, for that I'll need to render again the scene from the point of view of that object, and then sample it...which is something feasible, but a lot expensive and not supported automatically by the engine.
Nessun commento:
Posta un commento