sabato 22 agosto 2015

Day 50: Geometry shader

Today I decided to do one last thing on my point shadows.
I read  online that, instead of rendering 6 times to the six faces, you can just render the scene one time, and then use a geometry shader to render the 6 images to the 6 correct faces of the cube.

I guess this is quite faster, because you don't need to bind/unbind 6 textures from the depth_attachment, but the main reason why i liked the idea, is because i never used geometry shaders, and it was time to learn.

Everything went pretty smoothly, no problems at all!

Then I refactored the shader class to handles geometry shaders more nicely, and realized I could just remove all the .meta files I had till today, and all the "binding attribute" step, which is another nice polish of the engine.

So, actually nothing new, but a very positive day. In the picture i just toyed around a little with the shadows.


Nessun commento:

Posta un commento