Voyager Engine Update No.3

Well, it’s that time again. Nothing too fancy, just some fun hobby work I’ve been doing lately on my 3D rendering framework which goes by the working name “Voyager”. In this update, I’m trying it out by making this model viewer application. Can you guess which game this little bugger is from?

I’ve mostly been working on integrating the “Shader Reloader” I created last year into Voyager and the most recent feature I added was the support for wireframe shading. Instead of using geometry shaders which is the common approach, I sent barycentric coordinates as an extra attribute for each vertex and used edge detection by checking the fragment distance against the triangle coordinates with interpolation, essentially a similar approach as in a traditional ray/triangle intersection test.

barycentric-coordinates
Image courtesy of “Catlike Coding”

Although it’s cheaper, I have to think more about screen resolution and how I adapt the line thickness according to the camera distance (which looks awful by the way now at far distances and that’s why I’m not showing it…*nervous laughter*).

Anyway, having the shader reloading functionality implemented makes it so much easier to develop shaders as I’m saving plenty of time not having to recompile at every new startup of the model viewer application. The engine only supports an OpenGL render backend at the moment but I’ve established a high-level API agnostic interface which hopefully will help me implement DirectX backends in the future without too much pain. In the meantime while the interface grows, I’m focusing on more engine features and functionality that I want for creating effects and handling 3D-models.

(For the trained eye, please don’t kill me for the wireframe branch by the end of the shader, I will improve that check)

Leave a comment