Page 1 of 2

Future rendering topic

Posted: Thu Jan 19, 2017 4:09 pm
by FluffyFreak

Re: Future rendering topic

Posted: Fri Jan 20, 2017 8:57 am
by bszlrd
Do you have a specific aim in mind with Vulkan? Like new shading, BPR (not NPR, as I first said), etc? Or it's more about performance?
Asking, so I can prepare in advance to support your work from the asset side if needed. :)
And I already started to play with PBR stuff, to have a clue about more recent things:
Image

Re: Future rendering topic

Posted: Fri Jan 20, 2017 10:47 am
by FluffyFreak
@nozmajner that looks like PBR(PBR implementation) rather than NPR, and it looks good too! :)

I ran out of brain power for writing anything on this last night but here goes:

Instead of continuing the older "OpenGL 3.x Renderer" thread I decided to open this one to discuss where we could actually go next.

There are powerful ARM based platforms available now that mean we might want to support OpenGL ES 2 / 3.
Vulkan is availabled on the desktop for Windows and Linux (and future ARM boards).
Metal is OSXes Vulkan style API.
Of course there's been developments with OpenGL 4.5 out now.

So there's at least 4 backends there which are no longer so cross-platform.
They're also not as widely supported which is why we're stuck at OpenGL 3.1 currently.

We can certainly do an awful lot with GL3.1, including support PBR as in the image @nozmajner posted above, but it's clearly the older way of doing rendering and so we miss out on the performance improvements, and features, of the newer API's.

Re: Future rendering topic

Posted: Fri Jan 20, 2017 10:58 am
by FluffyFreak
One way of dealing with this complexity is to hide it away behind a 3rd party rendering library like BGFX (hello @bkaradzic!) which we've discussed a lot, now it really just needs one of us (probably me) to sit down and get hacking to implement it.

It's 95% likely that this is the route we'll head down, but it is a massive task with Pioneer.
Despite all the effort I've put into splitting the renderer from the rest of the codebase there would be as much work again to separate our renderer from our texture management, shader + effect handling.

There's also some complications because BGFX doesn't do shader compilation at runtime as far as I can tell.
I believe that it uses it's ShaderC program to compile everything beforehand(?) and this would be a problem with our shader being dynamically compiled to allow for graphics options and in future for the shaders generated from JSON files for the terrain generation.

That's not to count it out, all those problems can be worked around, it's just a bit more work.

The reason for BGFX of course is that it gives us the possibility of supporting OpenGL3.1 / GLES2.0 / Vulkan(eventually) & Metal with the same C++ code.
It's cross-platform, I've even run some of it's demos on my Raspberry-Pi 3.

Re: Future rendering topic

Posted: Fri Jan 20, 2017 11:57 am
by FluffyFreak
This is all about the technical or backend side of things of course and making sure that Pioneer can run on the maximum number of platforms whilst embracing newer rendering technologies.

Re: Future rendering topic

Posted: Fri Jan 27, 2017 2:45 pm
by FluffyFreak
I've got a little SDL2 + BGFX test thingey where I'll work on this, just to understand the shaderc, texturec and other associated bits.
It's at https://github.com/fluffyfreak/noisebgfx for anyone following along. As I post this it currently does nothing but open a window, clear the colour to grey and display some text.

Re: Future rendering topic

Posted: Mon Mar 20, 2017 9:28 pm
by bszlrd

Re: Future rendering topic

Posted: Tue Jun 27, 2017 12:33 pm
by FluffyFreak
Really good PBR explanation

Re: Code inspiration and rendering resource

Posted: Tue Oct 23, 2018 6:54 pm
by FluffyFreak
Also there are alternatives to BGFX, "The Forge" for example -> https://github.com/ConfettiFX/The-Forge

Re: Code inspiration and rendering resource

Posted: Wed Oct 24, 2018 7:58 pm
by impaktor
EDIT:This and below posts are a moderator-merge from post: "Code inspiration and rendering resource", as I think it's better to discuss here.
Also there are alternatives to BGFX, "The Forge" for example -> https://github.com/ConfettiFX/The-Forge
BGFX seems to have larger userbase, but this looks very impressive to, with IMGU support and such. Is there a reason / usage case that's driving the development of this project?