Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualRadikalizm

Posted 10 October 2012 - 03:53 PM

Remember that the Effects framework has been deprecated since the release of the latest windows SDK, so you might want to think about whether you want to keep on using it. The effects framework also isn't actually part of DirectX, but is built on top of it, so as far as I know the reflection API doesn't provide any info about effects and techniques but only about the underlying shaders themselves.

Everything you might need from the reflection API can be found here
From this interface you can basically get all the data and details you need from your shaders.

Also try not to think in terms of setting individual variables when working with shaders in D3D10/11, but rather in terms of working with constant buffers. The reflection API will give you complete data of where each of your shader variables can be found in constant buffers and what size they are, so that's a good starting point for binding data to your shaders.

I don't really understand your problem of using multiple materials with a shader, you just use the same shader instances for your material but pass in different values depending on what your material requires.

#3Radikalizm

Posted 10 October 2012 - 03:53 PM

Remember that the Effects framework has been deprecated since the release of the latest windows SDK, so you might want to think about whether you want to keep on using it. The effects framework also isn't actually part of DirectX, but is built on top of it, so as far as I know the reflection API doesn't provide any info about effects and techniques but only about the underlying shaders themselves.

Everything you might need from the reflection API can be found here: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476590(v=vs.85).aspx
From this interface you can basically get all the data and details you need from your shaders.

Also try not to think in terms of setting individual variables when working with shaders in D3D10/11, but rather in terms of working with constant buffers. The reflection API will give you complete data of where each of your shader variables can be found in constant buffers and what size they are, so that's a good starting point for binding data to your shaders.

I don't really understand your problem of using multiple materials with a shader, you just use the same shader instances for your material but pass in different values depending on what your material requires.

#2Radikalizm

Posted 10 October 2012 - 03:52 PM

Remember that the Effects framework has been deprecated since the release of the latest windows SDK, so you might want to think about whether you want to keep on using it. The effects framework also isn't actually part of DirectX, but is built on top of it, so as far as I know the reflection API doesn't provide any info about effects and techniques but only about the underlying shaders themselves.

Everything you might need from the reflection API can be found here: http://msdn.microsof...f476590(v=vs.85).aspx
From this interface you can basically get all the data and details you need from your shaders.

Also try not to think in terms of setting individual variables when working with shaders in D3D10/11, but rather in terms of working with constant buffers. The reflection API will give you complete data of where each of your shader variables can be found in constant buffers and what size they are, so that's a good starting point for binding data to your shaders.

I don't really understand your problem of using multiple materials with a shader, you just use the same shader instances for your material but pass in different values depending on what your material requires.

#1Radikalizm

Posted 10 October 2012 - 03:52 PM

Remember that the Effects framework has been deprecated since the release of the latest windows SDK, so you might want to think about whether you want to keep on using it. The effects framework also isn't actually part of DirectX, but is built on top of it, so as far as I know the reflection API doesn't provide any info about effects and techniques but only about the underlying shaders themselves.

Everything you might need from the reflection API can be found here: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476590(v=vs.85).aspx
From this interface you can basically get all the data and details you need from your shaders.

Also try not to think in terms of setting individual variables when working with shaders in D3D10/11, but rather in terms of working with constant buffers. The reflection API will give you complete data of where each of your shader variables can be found in constant buffers and what size they are, so that's a good starting point for binding data to your shaders.

I don't really understand your problem of using multiple materials with a shader, you just use the same shader instances for your material but pass in different values depending on what your material requires.

PARTNERS