Jump to content
  • Advertisement
Sign in to follow this  
MysteryX

DX11 Converting DX9 Code to DX11 DirectCompute

This topic is 993 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have this code running on DX9 that allows running HLSL shaders on video frame data. This plugs into an in-memory video processing chain scripting language. It's working very well so far.

https://github.com/mysteryx93/AviSynthShader/blob/master/Src/D3D9RenderImpl.cpp

 

This is one of the HLSL shaders I'm running

https://github.com/zachsaw/MPDN_Extensions/blob/master/Extensions/RenderScripts/SuperRes/SuperResEx.hlsl

 

Here's the problem. Other HLSL shaders such as this one require Shader Model 5, and as far as I know this cannot be run on DX9 and requires DX11. It means I have to convert the whole project to DX11 to make this possible.

https://github.com/zachsaw/MPDN_Extensions/blob/master/Extensions/RenderScripts/Super-xBR/super-xbr.hlsl

 

I have several questions.

 

1. Does DX11 allow running PS_3_0 shaders like the first one?

 

2. I know DX11 requires to also define a Vertex Shader. I see a Vertex Shader defined in the 2nd file. Is this a standard Vertex Shader that will work for every shader, or it might change from one shader to the other?

 

3. Where are the input textures defined? I'm not seeing S0 or S1 like in the first file.

 

4. Parameters also have to be configured differently. In the first file I have to define ConstantTables C0, C1, etc. and I don't see those in the 2nd file. How do I go about configuring parameters in that case?

 

5. Will it work with both shader model 3 or 5 but needs to be configured differently within the code?

 

6. Anything else needs to be done to make the conversion?

 

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!