Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

SharpDX ShaderReflection; get ShaderByteCode from EffectPass

$
0
0
Hello, i want to use - fxc Effect compiler to compile my Fx Files with, Techniques, Passes, Shaders to ByteCode => no Problem - SharpDX ShaderReflection to get attributes of every used Shader to generate Constant Buffer Structures an other things - to use ShaderReflection i have to feed the ShaderByteCode of every single Shader i want to operate with. I was succesfull to iterate through the Effect for the Techniques, an iterate through the Techniques for the Passes an the Descriptions I struggled a lot but cannot find out where is the connection to get the ShaderByteCode of the Shaders that are used by a EffectPass ?? Here is the anser of AlexandreMutel And even then, you can still use the FX file format - the difference is you'd have an offline compiler tool that parses the format for techniq ues/passes in order to acquire the necessary shader profiles + entry points. So with the profile/entry point in hand, you can run the FX file through the D3DCompiler to get a ShaderByteCode object for each shader, then use that to create a reflection object to query all your meta data. Then write out the reflected meta data to a file, that gets consumed by your application at runtime - which would be your own implementation of Effects11 (or something completely different, either way...you use the meta data to automatically setup your constant buffers, bind resources, and manage the shader pipeline by directly using the Direct3D11 shader interfaces). How do i get the pofile/entry point at hand ?? Please give me some help

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>