Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualATC

Posted 10 October 2012 - 03:40 PM

Hey guys... I'm rewriting our Shader/Material framework for our engine and want to know more about "ShaderReflection" and how to reflect shaders and strip information from them... for example, I want to know:

  • Each and every Technique and its name
  • Each and every Pass within each Technique and its name
  • Name and semantic of every global variable
  • [Very important] the type of each effect variable
  • The number and type of all variable members (if any, as in a structure)
  • Information about all cbuffers

As of right now I've been parsing the "Description" member of Effects, EffectTechniques and EffectPasses to learn most of this information from an Effect instance. However, it seems there is no way to get the actual type, nor figure out how many members (and type of members) a variable contains. I've never used the ShaderReflection type/API before, so I'm totally ignorant of how it works and how to use it... and can't seem to find the right information on Google (possibly due to my ignorance of what search queries to use lol).

Any help on this is greatly appreciated!

Regards,

--ATC--


EDIT: I'm also curious about the best way to bind variable values to an Effect (e.g., the fastest and most efficient way). And how might I need to handle the use of multiple materials based on the same shader?

#5ATC

Posted 10 October 2012 - 03:40 PM

Hey guys... I'm rewriting our Shader/Material framework for our engine and want to know more about "ShaderReflection" and how to reflect shaders and strip information from them... for example, I want to know:
  • Each and every Technique and its name
  • Each and every Pass within each Technique and its name
  • Name and semantic of every global variable
  • [Very important] the type of each effect variable
  • The number and type of all variable members (if any, as in a structure)
  • Information about all cbuffers
As of right now I've been parsing the "Description" member of Effects, EffectTechniques and EffectPasses to learn most of this information from an Effect instance. However, it seems there is no way to get the actual type, nor figure out how many members (and type of members) a variable contains. I've never used the ShaderReflection type/API before, so I'm totally ignorant of how it works and how to use it... and can't seem to find the right information on Google (possibly due to my ignorance of what search queries to use lol).

Any help on this is greatly appreciated!

Regards,

--ATC--


EDIT: I'm also curious about the best way to bind variable values to an Effect (e.g., the fastest and most efficient way). And how might I need to handle the use of multiple materials based on the same shader?

#4ATC

Posted 10 October 2012 - 03:31 PM

Hey guys... I'm rewriting our Shader/Material framework for our engine and want to know more about "ShaderReflection" and how to reflect shaders and strip information from them... for example, I want to know:

  • Each and every Technique and its name
  • Each and every Pass within each Technique and its name
  • Name and semantic of every global variable
  • [Very important] the type of each effect variable
  • The number and type of all variable members (if any, as in a structure)
  • Information about all cbuffers

As of right now I've been parsing the "Description" member of Effects, EffectTechniques and EffectPasses to learn most of this information from an Effect instance. However, it seems there is no way to get the actual type, nor figure out how many members (and type of members) a variable contains. I've never used the ShaderReflection type/API before, so I'm totally ignorant of how it works and how to use it... and can't seem to find the right information on Google (possibly due to my ignorance of what search queries to use lol).

Any help on this is greatly appreciated!

Regards,

--ATC--

#3ATC

Posted 10 October 2012 - 03:31 PM

Hey guys... I'm rewriting our Shader/Material framework for our engine and want to know more about "ShaderReflection" and how to reflect shaders and strip information from them... for example, I want to know:
  • Each and every Technique and its name
  • Each and every Pass within each Technique and its name
  • Name and semantic of every global variable
  • [Very important] the type of each effect variable
  • The number and type of all variable members (if any, as in a structure)
  • Information about all cbuffers
As of right now I've been parsing the "Description" member of Effects, EffectTechniques and EffectPasses to learn most of this information from an Effect instance. However, it seems there is no way to get the actual type, nor figure out how many members (and type of members) a variable contains. I've never used the ShaderReflection type/API before, so I'm totally ignorant of how it works and how to use it... and can't seem to find the right information on Google (possibly due to my ignorance of what search queries to use lol).

Any help on this is greatly appreciated!

Regards,

--ATC--

#2ATC

Posted 10 October 2012 - 03:31 PM

Hey guys... I'm rewriting our Shader/Material framework for our engine and want to know more about "ShaderReflection" and how to reflect shaders and strip information from them... for example, I want to know:
  • Each and every Technique and its name
  • Each and every Pass within each Technique and its name
  • Name and semantic of every global variable
  • [Very important] the type of each effect variable
  • The number and type of all variable members (if any, as in a structure)
  • Information about all cbuffers

As of right now I've been parsing the "Description" member of Effects, EffectTechniques and EffectPasses to learn most of this information from an Effect instance. However, it seems there is no way to get the actual type, nor figure out how many members (and type of members) a variable contains. I've never used the ShaderReflection type/API before, so I'm totally ignorant of how it works and how to use it... and can't seem to find the right information on Google (possibly due to my ignorance of what search queries to use lol).

Any help on this is greatly appreciated!

Regards,

--ATC--

#1ATC

Posted 10 October 2012 - 03:30 PM

Hey guys... I'm rewriting our Shader/Material framework for our engine and want to know more about "ShaderReflection" and how to reflect shaders and strip information from them... for example, I want to know:
  • Each and every Technique and its name
  • Each and every Pass within each Technique and its name
  • Name and semantic of every global variable
  • [Very important] the type of each effect variable
  • The number and type of all variable members (if any, as in a structure)
  • Information about all cbuffers
As of right now I've been parsing the "Description" member of Effects, EffectTechniques and EffectPasses to learn most of this information from an Effect instance. However, it seems there is no way to get the actual type, nor figure out how many members (and type of members) a variable contains. I've never used the ShaderReflection type/API before, so I'm totally ignorant of how it works and how to use it... and can't seem to find the right information on Google (possibly due to my ignorance of what search queries to use lol).

Any help on this is greatly appreciated!

Regards,

--ATC--

PARTNERS