Implementing BGFX as a driver...

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.

Re: Implementing BGFX as a driver...

Postby JFT90 » Wed Nov 08, 2017 7:48 pm

Ok, good to know. We probably need more test systems - we have some people with amd gpus though, and they didn't report any problems.

At the moment, I am considering dropping all other Videodrivers except the bgfxDriver and the nulldriver in our fork , that would allow to make changes to the rendering a lot quicker and adding new features would also not be as complicated anymore.
Anyone sees a problem with dropping the other drivers?
Irrlicht with bgfx-Driver https://gitlab.com/JFT/Irrlicht_extended (forked from Irrlicht trunk)
JFT90
 
Posts: 20
Joined: Sun Jan 03, 2016 6:53 pm

Re: Implementing BGFX as a driver...

Postby robmar » Thu Nov 30, 2017 3:09 pm

Only that the DX9 driver works so well, and fast. Is there any guarantee that the bGFX driver would be as fast and fully compatible, with all the same shaders working?

In regards to shaders, the GLSLC tool looks great, converting HLSL and GLSL to SPIRV. It would be useful if the HLSL/GLSL source could be available where converted to SPIRV, which I guess must be the way to go, for shading and general compute.

So will bGFX be SPIRV compatible, or how does this work?

PS There is no refractive/metal surface shader like in Irrlicht with this driver yet? The Irrlicht one works well and can be used with a reflection render texture to give reflection.
robmar
 
Posts: 1002
Joined: Sun Aug 14, 2011 11:30 pm

Re: Implementing BGFX as a driver...

Postby JFT90 » Tue Dec 05, 2017 11:42 am

Bgfx is/will be SPIRV compatible: https://github.com/bkaradzic/bgfx/blob/master/tools/shaderc/shaderc_spirv.cpp (it's bgfx specific spirv i think - so you can not use spirv created from other compilers)

There is no guarantee at the moment that all the same shaders will be working - we would need help to implement all material shaders that are builtin in the normal irrlicht drivers.
Since we didn't need most of them yet I didn't implement them. If you implement some of the materials for bgfx - we will happily merge them.

Concerning the loading of shaders on startup (not having them inside the source code) will produce the need to ship a shader package with the library to properly run irrlicht.
So we are sticking with the method of hard coding the shaders into irrlicht.

There is no refractive/metal surface shader like in Irrlicht with this driver yet?


Yes, was not needed yet - I can have a look (if I have time) to see how hard it is to implement it for bgfx.
Irrlicht with bgfx-Driver https://gitlab.com/JFT/Irrlicht_extended (forked from Irrlicht trunk)
JFT90
 
Posts: 20
Joined: Sun Jan 03, 2016 6:53 pm

Re: Implementing BGFX as a driver...

Postby robmar » Fri Dec 15, 2017 4:03 pm

Okay, sounds good!

Where the hell are those pesky irrlich shaders stored? I'll convert them, I think they are in asm, to HLSL if any one can tell me where they are hard coded? :)

In particular, the bump map shader, and the metal one.

Once they're working in HSLS, it will be easy to add them for bGFX using the cross-compiler if needed.
robmar
 
Posts: 1002
Joined: Sun Aug 14, 2011 11:30 pm

Re: Implementing BGFX as a driver...

Postby CuteAlien » Sat Dec 16, 2017 2:23 pm

Some Irrlicht shaders are in media folder. Some are directly in c++ classes for materials like COpenGLNormalMapRenderer.cpp (right at the top).
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8365
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: Implementing BGFX as a driver...

Postby robmar » Sun Dec 17, 2017 12:29 am

The D3D shader, bump shader, is in CD3DNormalMapRenderer.cpp then?

I guess these shader were written in asm... any good reference guides or tools to convert them to HLSL??
robmar
 
Posts: 1002
Joined: Sun Aug 14, 2011 11:30 pm

Re: Implementing BGFX as a driver...

Postby CuteAlien » Sun Dec 17, 2017 2:12 am

Yeah, CD3D9NormalMapRenderer.cpp. And no idea about tools or converting, sorry.
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8365
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Previous

Return to Open Discussion and Dev Announcements

Who is online

Users browsing this forum: No registered users and 1 guest