Page 1 of 1

DirectX11 in 1.12 (or any 1.x release)?

Posted: Thu May 02, 2019 9:06 pm
by SufferinPup
Ogre Version: : 1.12
Operating System: : Windows
Render System: : DirectX11

What is the status of the DirectX11 render system in the 1.x releases? I've downloaded and compiled 1.12, but when I try to run many of the samples with the DirectX11 renderer I get the error message "assembly shaders are unsupported". Bump Mapping, Shadows, Deferred Rendering, a few more (didn't go through them all).

Re: DirectX11 in 1.12 (or any 1.x release)?

Posted: Thu May 02, 2019 10:18 pm
by paroj
most things do work. However many Samples were not updated with the D3D11 specific quirks. Therefore you need to look into the specific sample to find out the cause. Also a failed sample can corrupt the global render state and cause successive samples to fail. Therefore you should restart the sample browser after hitting a failing sample.

Finally you can lower the "Information Queue Exception Level" in the graphics settings.

Re: DirectX11 in 1.12 (or any 1.x release)?

Posted: Thu May 02, 2019 10:28 pm
by SufferinPup
Ahah thanks for the update. What does that error, "assembly shaders are unsupported", mean?

I'm attempting to get DX11 working in my older 1.9-based engine, and getting that error when trying to load my custom cg shaders. Is it that cg isn't supported in DX11? Converting all our shaders to hlsl wouldn't be so bad, but that error is kind of vague so I'm not sure if there is more to it than that.

Thanks for the clarification.

Re: DirectX11 in 1.12 (or any 1.x release)?

Posted: Fri May 03, 2019 11:06 am
by paroj
SufferinPup wrote:
Thu May 02, 2019 10:28 pm
Ahah thanks for the update. What does that error, "assembly shaders are unsupported", mean?

I'm attempting to get DX11 working in my older 1.9-based engine, and getting that error when trying to load my custom cg shaders. Is it that cg isn't supported in DX11? Converting all our shaders to hlsl wouldn't be so bad, but that error is kind of vague so I'm not sure if there is more to it than that.

Thanks for the clarification.
It means that your custom Cg shaders are not supported. What is happening is that the Cg plugins compiles the shaders into e.g. vs_2_0 assembly and tries to pass that to D3D11.

For most part you should be fine with just changing the program type from Cg to HLSL in the ogre material files as done here:
https://github.com/OGRECave/ogre/commit ... f4d89e2da4

Re: DirectX11 in 1.12 (or any 1.x release)?

Posted: Fri May 03, 2019 3:02 pm
by SufferinPup
Oh of course, that makes sense! Okay thanks for all the info, I'll just start converting my shaders to hlsl (which for many is just a file rename).

Re: DirectX11 in 1.12 (or any 1.x release)?

Posted: Sat May 25, 2019 12:01 am
by rpgplayerrobin
I have support for D3D11 in my game project, but the performance is way better when using D3D9, just in case you are wondering.