Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

VP2.0 shaderOverride on MSceneRender fails on dx11 viewport (2016 +SP5)

VP2.0 shaderOverride on MSceneRender fails on dx11 viewport (2016 +SP5)

Anonymous
Not applicable
1,305 Views
6 Replies
Message 1 of 7

VP2.0 shaderOverride on MSceneRender fails on dx11 viewport (2016 +SP5)

Anonymous
Not applicable

Hey guys,

 

I'm having trouble getting a shaderOverride to work on a MSceneRender in the dx11 viewport making it impossible to use.

 

 

The bug is easy to recreate:

1. Compile viewMRenderOverride plugin found on the devKit (compiled x64 version)

2. Load the plugin in a maya running the DirectX 11 viewport with some geometry inside

3. Change the viewport renderer to "Render Override Options Renderer"

4. Write the following MEL command: viewMRenderOverride -shaderOverride 1

 

The geometry will dissapear because the shader is causing problems, the output window will display the following message:

 

V2Renderer : OGS WARNING: DX11: CreateInputLayout(): E_INVALIDARG - The parameter is incorrect. 
OGS::Devices::DeviceContextDx11::CreateInputLayout D:\Stage\BB63_0910_WIN\BB63\AIRViz\Devel\VirtualDevices\Dx11\DeviceContextDx11.cpp 3808
V2Renderer : OGS WARNING: Draw failed.
Unable to apply an appropriate input layout.
The current vertex buffer format may be incompatible with the current effect.) 0

 

Does anyone know how to fix this? This error happens on all pluggins that try to override a scene shader on the dx11 viewport (viewRenderOverrideMRT, viewRenderOverrideShadows, viewRenderOverride)

 

The shader override works well on openGL viewport, however, I need it to work on directx11 as all the shader code I've created has been written on HLSL.. 

Any help is highly appreciated!

 

specs:

Win10 Pro x64

Intel Xeon E5-2609

16GB Ram

Quadro K5000

 

thank you in advance

0 Likes
1,306 Views
6 Replies
Replies (6)
Message 2 of 7

cheng_xi_li
Autodesk Support
Autodesk Support

Hi thesanty,

 

I am unable to reproduce your issue on my laptop (Windows 7 SP1+K4100m 354.56 ODE).

 

I think it could be a windows 10 driver issue. Can you try Windows 7 SP1?

 

Yours,

Li

0 Likes
Message 3 of 7

Anonymous
Not applicable

Hi Li,

 

thank you for your reply. You are right indeed, on windows 10 the pluggin fails to override the shader on the dx11 viewport with the error message above (tried it on two different win10 computers with latest video drivers -> k5000-354.56 ODE and Intel Iris 540). However, I got it working without issues on a windows 7 SP1 from a colleague of mine.

Do you know if there is a way to get this working on win 10? When could a fix be made available for this? I need to consider the different options I have (translate all code to GLSL or wait/hack a fix for this bug)

 

thank you again very much for your time and help/support

 

best regards,

 

Santiago

 

0 Likes
Message 4 of 7

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

I am still trying to reproduce this issue now.

 

I did more test with my computer and my colleague's Windows 10 computer.

 

My computer is Windows 10(10.0.10586) with Geforce TitanX(361.43)

 

My colleague's computer is Windows 10 with an ATI card.

 

They are both working fine. I'll do more test on next Monday once I could find a Quadro card with Windows 10.

 

Yours,

Li

0 Likes
Message 5 of 7

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

I tried another laptop with Quadro card and win10 system but still faied to reproduce your problem.

 

Maybe there are some other issues.

 

Yours,

Li

0 Likes
Message 6 of 7

Anonymous
Not applicable

Hi Li,

 

Thank you for your time and dedication. I have tried the pluggin with the scene render shader override on a Win 7 with a Quadro 5000 and the dx11 viewport problem is also there, as well. It seems to be a problem from the quadro drivers? (both quadro k5000 and 5000 fail, wheras the win 7 test I did before was with a GTX card and it worked fine).

I started moving the shaders to GLSL and everything is working great so far with the OpenGL Core Profile viewport. It is really annoying though that I can't use the dx11 viewport for that (therefore rewritting everything).

0 Likes
Message 7 of 7

Anonymous
Not applicable

Hi Li and everyone else,

 

I have gone further into trying to solve this issue and apologize for not explaining myself clearly before.

The shader override works well on objects with the default lambert shader, however, it fails to render under certain conditions.

 

I have created a short video explaining how to recreate the issue and explain how this is affecting development of custom dx11 renderers.

 

[video]

 

This happens on both Win 7 and Win10 and with all graphics cards I have tested it on (Quadro k5000, Quadro 5000, GTX680 and Intel Iris 540) The previous test which "worked" on windows 7 didn't run on the directx viewport either(it was openGL where the test worked). No computer I have tried this on has worked so far.

 

I thank you all for your help and support.

best regards,

 

Santiago

0 Likes