Today I spent the morning fixing some tiny problems I noticed with the engine, as well as some minor improvements (like adding the screen size to the global UBO).
In the afternoon, I moved the logic of the post processor to a manager class. Each scene holds its own post processor, so the user can select a different behavior for each scene.The post processor simply holds a vector of materials (that is, a shader plus its arguments), and the renderer iterates through the list to apply them. The result of each pass is saved alternatively to two render textures, and the next step samples it.
Finally I added command to the shell to enable and disable the post processor dinamically.
In the picture, two postprocessing effects working at the same time: the first masks away the green channel, and the second flips the uv coordinates.

Nessun commento:
Posta un commento